Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cell = peripheral.wrap("right")
- local mon = peripheral.wrap("top")
- term.clear()
- term.setCursorPos(1,1)
- print("Displaying Power")
- mon.setTextScale(1)
- while true do
- local z = cell.getEnergy("unknown")
- local y = cell.getEnergyCapacity("unknown")
- maxP = math.floor(y)
- nowP = math.floor(z)
- mon.clear()
- mon.setCursorPos(1,1)
- mon.write("Current Power")
- mon.setCursorPos(1,2)
- mon.write(nowP)
- mon.setCursorPos(1,4)
- mon.write("Maximum Power")
- mon.setCursorPos(1,5)
- mon.write(maxP)
- sleep()
- end
Add Comment
Please, Sign In to add comment