Quote:
Originally Posted by brobot
Were trying to use a low pressure switch for our pneumatics. My question is do I need to program it so it'll work? If so, how?
|
yes. you'll need two things
1) a pressure switch on the compressor that will return true when the pressure is above n psi and false when it is below n psi. (ask your electrical team to setup n)
2) a compressor hooked up to the sidecar (or a relay hooked up to the compressor)
if(pressure switch == true){
set compressor = false
}else{
set compressor = true
}
so basically what it will do is that if the pressure switch is returning true (meaning that its above n psi) than turn the compressor off but if its returning false (below n psi) it will turn it on to turn up the psi.
you also will want to have this running not only in teleopPeriodic but also autonomosPeriodic and disabledPeriodic