View difference between Paste ID: Z4DnxUwc and RESZtXAr
SHOW: | | - or go back to the newest paste.
1
modem = peripheral.wrap("top")
2
3
shell.run("clear")
4
print("What would you like to say?")
5
print(" ")
6
newmsg = read()
7
modem.transmit(68,69,newmsg)
8
modem.open(69)
9
shell.run("clear")
10
print("Your message has been sent!")
11
event, side, chan, rchan, msg, dist = os.pullEvent("modem_message")
12
if msg == "Received!" then
13
  print("Your message has been received!")
14
else
15
  print("An invalid message has been returned.")
16
  print("Your message probably has not been received.")
17
end
18
sleep(2)
19
print(" ")
20
print("Rebooting...")
21
sleep(3)
22
shell.run("reboot")