Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local turbine = peripheral.wrap("right")
- local maxEnergy = turbine.getEnergyCapacity()
- function firstCheck()
- energy = turbine.getEnergy()
- enrgPerc = energy * 100 / maxEnergy
- if(enrgPerc < 40) then
- redstone.setOutput("left", not redstone.getOutput("left"))
- end
- end
- firstCheck()
- while true do
- energy = turbine.getEnergy()
- enrgPerc = energy * 100 / maxEnergy
- if(enrgPerc > 40) then
- redstone.setOutput("left", not redstone.getOutput())
- end
- end
Add Comment
Please, Sign In to add comment