Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = peripheral.wrap("back")
- g = peripheral.wrap("top")
- maxEnergy = 900000
- function shouldRun()
- shouldRun = false
- if t.getEnergyStored() < maxEnergy then
- shouldRun = true
- end
- return shouldRun
- end
- while true do
- rpm = t.getRotorSpeed()
- p.setActive(shouldRun())
- g.addText(5,10,"RPM: "..rpm)
- sleep(0.25)
- g.clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement