Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("left")
- function cell()
- ene = p.getEnergyStored()
- c = math.abs(ene)
- print(c)
- if c <= 0 then
- rs.setBundledOutput("right", colors.white)
- print("Charging for 5 minutes")
- sleep(300)
- rs.setBundledOutput("right", 0)
- else
- sleep(10)
- end
- end
- while true do
- cell()
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement