Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local compressor = peripheral.wrap("left")
- local dPressure = compressor.getDangerPressure()
- while true do
- local pressure = compressor.getPressure()
- print("Compressor Pressure: "..pressure)
- if pressure <= dPressure / 2 then
- rs.setOutput ("left", true)
- print ("Refueling")
- turtle.turnLeft()
- turtle.drop(1)
- turtle.turnRight()
- compressor = peripheral.wrap("left")
- else
- rs.setOutput("left", false)
- end
- turtle.select(1)
- if turtle.getItemCount(1) < 1 then
- turtle.suckDown()
- print("Need Coal..")
- end
- print ("Waiting 10sec..")
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment