Quote:
Originally Posted by Twisted eric
if (fluffy.getPressureSwitchValue()) {
fluffy.setRelayValue(edu.wpi.first.wpilibj. Relay.Value.kOff);
} else {
fluffy.setRelayValue(edu.wpi.first.wpilibj. Relay.Value.kOn);
}
this will i believe to turn off the compressor
(have not yet tried it yet)
also is the only import we need is
import edu.wpi.first.wpilibj.solenoid;
right
thanks.
|
First of all, instead of doing "edu.wpi.first.wpilibj.Relay.value.kOn", isn't it much easier to just to "Relay.value.kOn"?
From what my team assumed, the compressor automatically turns on/off, depending on the pressure switch. We initially couldn't get it to work, but it turned out to just be a bad spike. So I'm not really sure if you need to be turning it on/off.
As for the solenoid, yes all you need to import is
Code:
import edu.wpi.first.spilibj.Solenoid;
Depending on how you've connected your solenoid(s), you will have to set them true or false to get it to work as you wish.
Hope that helped.