Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- monitor = peripheral.wrap("top")
- battery = peripheral.wrap("Induction Matrix_4")
- storagedmax = battery.getMaxEnergy()*0.4
- storaged = battery.getEnergy()*0.4
- pourcent = (storaged/storagedmax)*100
- input = battery.getInput()*0.4
- output = battery.getOutput()*0.4
- if monitor == nil then
- error("monitor disconnect")
- else
- monitor.clear()
- monitor.setCursorPos(1, 1)
- end
- if battery == nil then
- error("battery disconnect")
- end
- monitor.write(storagedmax)
- monitor.write(" et ")
- monitor.write(storaged)
- monitor.write(" ")
- monitor.write(pourcent)
- monitor.setCursorPos(1, 2)
- monitor.write(input)
- monitor.write(" et ")
- monitor.write(output)
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement