Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local rsignal = redstone.getInput("left")
- local turbine1 = peripheral.wrap("BigReactors-Turbine_0")
- local mon = peripheral.wrap("monitor_0")
- mon.setTextScale(0.5)
- local spin = turbine1.getRotorSpeed()
- mon.clear()
- mon.setCursorPos(1,1)
- mon.write("Turbine 1 spin rate is: "..spin)
- if rsignal == true then
- mon.setCursorPos(1,2)
- mon.write("Redstone is currently on")
- while true do
- if spin < 1750 then
- turbine1.setInductorEngaged(false)
- mon.setCursorPos(1,3)
- mon.write("Coils spinning up to speed")
- sleep(2)
- else
- turbine1.setInductorEngaged(true)
- mon.setCursorPos(1,3)
- mon.write("Coils up to speed and engaged")
- break
- end
- end
- else
- mon.setCursorPos(1,2)
- mon.write("Redstone is currently off")
- turbine1.setInductorEngaged(false)
- mon.setCursorPos(1,3)
- mon.write("No power needed - coils disengaged")
- end
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement