Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rSide = "top" -- edit to modem side
- local receiveID = 1 -- edit to display computers id.
- local running = true
- rednet.open(rSide)
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- while running do
- clear()
- print("Command \"start\" or \"stop\"")
- write("command > ")
- cmd = read()
- if cmd == "start" then
- rednet.send(receiveID, "start")
- print("Message sent")
- sleep(2)
- elseif cmd == "stop" then
- rednet.send(receiveID, "stop")
- print("Message Sent")
- sleep(2)
- else
- print("wrong input...")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement