Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("right") --EU Storage location, works on all variations of bat boxes
- m = peripheral.wrap("top") --Monitor location
- m.setTextScale(2)
- while true do
- x = p.getEUStored() --Takes initial measurement
- sleep(5) --waits 5 seconds to take the measurement again
- y = p.getEUStored() --Takes second measurement
- z = y - x
- s = z/5 --Devides by five to give an average across 5 seconds
- t = s/20 --Assumes a tick of 20 to give you a per tick value
- m.clear()
- m.setCursorPos(1,1)
- m.write(c.."EU/s")
- m.setCursorPos(1,2)
- m.write(t.."EU/t")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement