Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local serverID = 0 -- change to the id of the computer that sends the message
- local mSide = "back" -- change to the side of the monitor
- local rSide = "right"
- local sTitle = "====== Remote Display ======"
- local mon = peripheral.wrap(mSide)
- while true do
- rednet.open(rSide)
- local id, msg = rednet.receive()
- if id == serverID then
- mon.clear()
- local obj = textutils.unserialize(msg)
- mon.setCursorPos(1,1)
- mon.write(sTitle)
- local mon_y = 2
- for k,v in pairs(obj) do
- mon.setCursorPos(1, mon_y)
- mon.write(v)
- mon_y = mon_y + 1
- end
- end
- rednet.close(rSide)
- os.sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement