Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.find("monitor")
- local modem = peripheral.find("modem")
- term.clear()
- monitor.clear()
- monitor.setTextScale(1.0)
- monitor.setCursorPos(4,1)
- print("Monitor Running...")
- monitor.write("Boiler Monitor")
- local function printStatus(title, channel, line)
- monitor.setCursorPos(4,line)
- monitor.write(title)
- monitor.setCursorPos(4,line + 1)
- monitor.write("Status:")
- modem.open(channel)
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- monitor.clearLine()
- monitor.setCursorPos(4,line + 1)
- monitor.write("Status: "..message)
- modem.close(channel)
- end
- while not rs.getInput("back") do
- printStatus("--Boiler #1--", 2, 4)
- printStatus("--Boiler #1 Fuel Feed--", 3,7)
- printStatus("--Boiler #2--", 6,10)
- printStatus("--Boiler #2 Fuel Feed--", 5,13)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement