Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- timerAttivo = true
- latoTimer = "back"
- durataSegnale = 0.2
- intervalloTimer = 1
- posizioneLeva = "right"
- function runTimer()
- while timerAttivo == true do
- print (shell.run("redprobe"))
- if redstone.getInput(posizioneLeva) then
- timerAttivo = true
- redstone.setOutput(latoTimer, true)
- sleep (durataSegnale)
- redstone.setOutput(latoTimer, false)
- sleep (intervalloTimer)
- else
- timerAttivo = false
- end
- end
- end
- -- loop infinito
- while true do
- os.pullEvent("redstone")
- timerAttivo = true
- runTimer()
- end
Advertisement
Add Comment
Please, Sign In to add comment