Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("top")
- e = m.getEUStored()
- s = m.getEUCapacity()
- p = e/s*100
- rs = redstone
- function low()
- print(p)
- if p<80 then
- rs.setOutput("right", false)
- rs.setOutput("left", true)
- else
- sleep(5)
- end
- end
- --function high()
- --if e > 3500000 then
- -- rs.setOutput("left", false)
- -- rs.setOutput("right", true)
- -- else
- -- sleep(10)
- --end
- --end
- --function main()
- --m.getEUStored()
- while true do
- rs.setOutput("right", true)
- rs.setOutput("left", false)
- low()
- --high()
- sleep(10)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment