Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local gpu = component.gpu
- local me = require('me')
- local zn = require('zn')
- local watch = {"deuterium", "tritium"}
- local from = "gases_reactor"
- function monitor()
- zn.connect()
- local storage = me:new()
- local message = {
- from = from
- }
- local d
- while true do
- d = storage:getGases(watch)
- message["data"] = d
- local n = 2
- for i,v in pairs(d) do
- gpu.set(1, n, i .. ": " .. v .. " mB")
- n = n + 1
- end
- zn.broadcast(message)
- os.sleep(1)
- end
- zn.disconnect()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement