Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local host = 1
- rednet.open("front")
- local mon = peripheral.wrap("top")
- mon.setBackgroundColor(colors.black)
- mon.clear()
- rednet.send(host,"ping")
- local status = rednet.receive()
- mon.setBackgroundColor(tonumber(status))
- mon.clear()
- while true do
- local event, a, b = os.pullEvent()
- if event == "rednet_message" and a == host then
- mon.setBackgroundColor(tonumber(status))
- mon.clear()
- elseif event == "monitor_touch" then
- rednet.send("host","open")_
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement