Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function round(num, idp)
- local mult = 10^(idp or 0)
- return math.floor(num * mult + 0.5) / mult
- end
- cell = peripheral.wrap('left')
- while true do
- if round(cell.getEnergyStored()/80000000*100,2) <= 20 then
- redstone.setOutput('right',true)
- end
- if round(cell.getEnergyStored()/80000000*100,2) >= 80 then
- redstone.setOutput('right',false)
- end
- sleep(60)
- end
Add Comment
Please, Sign In to add comment