Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- channel = 737
- modem = peripheral.wrap("top")
- modem.open(channel)
- cmd = ""
- function transmitCMD(cmd)
- modem.transmit(channel,channel,cmd)
- end
- transmitCMD("off")
- repeat
- term.clear()
- term.setCursorPos(1,1)
- print("Enter State (on/off): ")
- cmd = read()
- if(cmd == "exit") then
- print("exiting")
- else
- transmitCMD(cmd)
- end
- until cmd == "exit"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement