Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- readout = "Awaiting time shift."
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- while true do
- sunrise = os.setAlarm(6.00)
- sunset = os.setAlarm(18.00)
- event, input = os.pullEvent("alarm")
- if input == sunrise then
- redstone.setOutput("back", false)
- clear()
- print("lights off.")
- elseif input == sunset then
- redstone.setOutput("back", true)
- clear()
- print("lights on.")
- end
- end
- clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement