View Single Post
  #1   Spotlight this post!  
Unread 06-02-2014, 18:07
anthonygraff24 anthonygraff24 is offline
Registered User
FRC #2872 (CyberCats)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Long Island
Posts: 38
anthonygraff24 is an unknown quantity at this point
Pressure Switch Not Working?

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?