Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("monitor_256")
- me = peripheral.wrap("right")
- local function centerText(text)
- local x2,y2 = term.getCursorPos()
- local x,y = term.getSize()
- term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
- write(text)
- end
- local function mWrite(text)
- local x2,y2 = m.getCursorPos()
- local x,y = m.getSize()
- m.setCursorPos(math.floor((x / 2) - (text:len() / 2)), y2)
- m.write(text)
- end
- while true do
- power = tostring(math.floor(me.getAvgPowerUsage()))
- m.clear()
- m.setCursorPos(1,1)
- mWrite("AE Power Use:")
- m.setCursorPos(1,3) -- here
- mWrite(power)
- print("sleep")
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment