Facebook
From Abrupt Ostrich, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 56
  1. pulseLength = 1 -- In ticks
  2. clockSpeed = 20 -- In ticks
  3. while true do
  4.     while not rs.getInput("front") do -- Remove "not" if you want to enable the clock when supplying a signal
  5.         rs.setOutput("back", true)
  6.         sleep(pulseLength / 20)
  7.         rs.setOutput("back", false)
  8.         sleep((clockSpeed - pulseLength) / 20)
  9.     end
  10.         event = os.pullEvent("redstone")
  11. end