Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("monitor_0")
- local bat = peripheral.wrap("Induction Matrix_0")
- local pre = 0
- mon.setBackgroundColor(colors.blue)
- mon.setTextColor(colors.white)
- mon.clear()
- while true do
- local n = bat.getEnergy()
- mon.setCursorPos(25,10)
- mon.write(tostring(math.floor(n)).." ")
- mon.setCursorPos(25,11)
- mon.write(tostring(math.floor((n/bat.getMaxEnergy())*100)).." ")
- local dif = (n - pre) / 20
- mon.setCursorPos(25,12)
- mon.write(tostring(math.floor(n-pre)).." "..tostring(math.floor(dif)).." ")
- pre = n
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement