Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ontime = 2
- offtime = 1
- function setMonitor(food)
- term.clear()
- term.write("Ontime = " + ontime)
- term.setCursorPos(1,2)
- term.write("Offtime = " + offtime)
- term.setCursorPos(1,3)
- if food == "cheese" then
- term.write("Status: On")
- else
- term.write("Status: Off")
- end
- end
- while true do
- rs.setOutput("left", true)
- setMonitor(cheese)
- os.sleep(ontime)
- rs.setOutput("left", false)
- setMonitor(egg)
- os.sleep(offtime)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement