Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------------------------------------------------------------
- -- PneumaticCraft - High Preassure Control V1.0
- ----------------------------------------------------------------------------------
- -- Written by AmigaLink (http://www.youtube.com/user/AmigaLink)
- ----------------------------------------------------------------------------------
- local maxPreassure = 12
- -- This is the pressure you which to have
- ----------------------------------------------------------------------------------
- local rsSignal = 0
- local rsPreassure = 2/3*maxPreassure
- while true do
- rsSignal = rs.getAnalogueInput("back")
- print(rsSignal.."/"..rsPreassure.." = "..rsSignal/(2/3).." bar")
- if rsSignal >= rsPreassure then
- rs.setOutput("right", true)
- else
- rs.setOutput("right", false)
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement