Advertisement
popatop15

Receiver Program

Jul 21st, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. -- Receiver Program
  2. local monitorSide = "top"
  3. local modemSide = "right"
  4.  
  5. local mon = peripheral.wrap(monitorSide)
  6. rednet.open(modemSide)
  7. while true
  8. do
  9. local id, message = rednet.listen()
  10. mon.clear()
  11. mon.setCursorPos(0,1)
  12. mon.write(textutils.formatTime(os.Clock(), false))
  13. mon.setCursorPos(0,2)
  14. mon.write("From: "..id)
  15. mon.setCursorPos(0,3)
  16. mon.write("Message: "..message)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement