Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- parallel.waitForAll(mon1, mon2, input)
- end
- function input()
- sleep(5)
- while true do
- clear()
- write("Waiting for input: ")
- input = read()
- clear()
- print("You entered: "..input)
- sleep(5)
- end
- end
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function mon1()
- local mon = peripheral.wrap("right")
- while true do
- mon.clear()
- mon.setCursorPos(1,1)
- mon.write("World Time: ")
- mon.write(os.clock())
- sleep(0.1)
- end
- end
- function mon2()
- local mon = peripheral.wrap("left")
- while true do
- mon.clear()
- mon.setCursorPos(1,1)
- mon.write("Computer Time: ")
- mon.write(os.time())
- sleep(0.1)
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement