Guest User

Untitled

a guest
May 6th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment