Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sleeptime = 30
- input = "right"
- output = "left"
- counter = sleeptime
- mon = peripheral.wrap("top")
- mon.setTextScale(1)
- mon.clear()
- while true do
- if redstone.getInput(input) then
- counter = sleeptime
- while counter > 0 do
- mon.clear()
- mon.setCursorPos(1,3)
- mon.write(string.format("%2d", counter))
- sleep(1)
- counter = counter - 1
- end
- mon.clear()
- redstone.setOutput(output, true)
- sleep(0.2)
- redstone.setOutput(output, false)
- end
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement