Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- you can change the input/output redstone sides to:
- -- top,bottom,left,right,front,back
- local tArgs = {...}
- pulseLength = tArgs[1] -- In ticks
- clockSpeed = tArgs[2] -- In ticks, remember 20 ticks a second
- while true do
- while not rs.getInput("bottom") do -- Remove "not" if you want to enable the clock when supplying a signal
- rs.setOutput("top", true)
- sleep(pulseLength / 20)
- rs.setOutput("top", false)
- sleep((clockSpeed - pulseLength) / 20)
- end
- event = os.pullEvent("redstone")
- end
Advertisement
Add Comment
Please, Sign In to add comment