Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Load Charts API
- os.loadAPI("/apis/charts")
- os.loadAPI("/apis/ic2")
- os.loadAPI("/apis/tools")
- --Load Peripherals
- mon = peripheral.find("monitor")
- mon.setTextScale(1)
- rednet.open("back")
- --Start Program
- while true do
- local id, msg, protocol = rednet.receive("ME-MFSU")
- local t = textutils.unserialize(msg)
- charge = tonumber(t[3])
- term.redirect(mon)
- tools.clear()
- if charge > 70 then
- charts.lineColor("",2,5,16,stored,capacity,colors.green,colors.white,false)
- end
- if charge <= 70 and charge > 45 then
- charts.lineColor("",2,5,16,stored,capacity,colors.yellow,colors.white,false)
- end
- if charge <= 45 then
- charts.lineColor("",2,5,16,stored,capacity,colors.red,colors.white,false)
- end
- tools.line(-13,-2)
- term.write("MFSU Charge:")
- tools.line(-9,3)
- term.write(tostring(tools.round(charge, 0)))
- term.write("%")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement