We are having some trouble with getting our compressor to work on its own. What we want it to do is to start on its own (it does that), stop when the system hits ~120psi, and restart when it drops back down to ~90psi. Our code looks like this:
if (airCompressor.getPressureSwitchValue()) {
airCompressor.setRelayValue(edu.wpi.first.wpilibj. Relay.Value.kOff);
}
else {
airCompressor.setRelayValue(edu.wpi.first.wpilibj. Relay.Value.kOn);
}
However, the compressor just runs without stopping. Any ideas on why this might happen?
