Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitor = peripheral.wrap("top")
- monitor.setCursorPos(1, 1)
- monitor.clear()
- monX, monY = monitor.getSize()
- monitor.setTextScale(0.5)
- monitor.setTextColor(43)
- monitor.setCursorBlink(true)
- monitor.write("Starting...")
- monitor.setCursorPos(1, 2)
- rednet.open("right")
- function write(msg)
- curX, curY = monitor.getCursorPos()
- monitor.write(msg)
- if curY == monY then
- monitor.scroll(1)
- monitor.setCursorPos(1, monY)
- else
- monitor.setCursorPos(1, curY + 1)
- end
- end
- function displayBattery()
- while true do
- senderId, message, protocol = rednet.receive("battery")
- if protocol == "battery" then
- write(message)
- end
- end
- end
- displayBattery()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement