Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local turbine
- turbine = peripheral.wrap("right")
- print("checking speed")
- speed = turbine.getRotorSpeed()
- turbine.setInductorEngaged(false)
- turbine.setActive(true)
- while redstone.getInput("top") == true
- do
- speed = turbine.getRotorSpeed()
- engaged = turbine.getInductorEngaged()
- if speed > 1880 then if engaged == false then turbine.setInductorEngaged(true) print("Inductor Engaged ") print(speed) end end
- if speed < 1780 then if engaged == true then turbine.setInductorEngaged(false) print("Inductor Disengaged ") print(speed) end end
- os.sleep(2)
- print("checking speed")
- end
- turbine.setInductorEngaged(true) turbine.setActive(false) print("Turbine shutdown ") print(speed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement