Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this program is for pocket computers, and allows manual testing of Test Tracks
- local Target = nil
- local Protocol = nil
- local Action = nil
- DirectorProtocol = 5362
- start()
- function start()
- Menu()
- end
- function Menu()
- print("Please Enter Action")
- print("1= start, 2= stop, 3= Lockdown")
- while true do
- local event, key = os.pullEvent("key")
- if key == keys.1 then
- Action = "start"
- break
- elseif key == keys.2 then
- Action = "stop"
- break
- elseif key == keys.3 then
- Action = "Lockdown"
- break
- end
- end
- print("Please Enter Track ID"
- local input = read()
- while true do
- local event, key = os.pullEvent("key")
- if key == keys.enter then
- Target = input
- break
- end
- end
- print("Press T to begin")
- repeat
- local event, key = os.pullEvent("key")
- until key == keys.t
- rednet.broadcast(Target, DirectorProtocol)
- rednet.broadcast(Action, DirectorProtocol)
- print("Sent Successfuly, rebooting in 15 seconds")
- sleep(15)
- os.reboot
- end
Add Comment
Please, Sign In to add comment