Skip to main content

Stow/Deploy Coordination

Disclaimer: WIP and untested; adapt to your mechanism and sensors. Custom code built on WPILib APIs.

Code (Java)

public class StowDeploy extends SubsystemBase {
private final Solenoid deploySolenoid = new Solenoid(PneumaticsModuleType.CTREPCM, 0);
private boolean stowed = true;

public void stow() {
deploySolenoid.set(false);
stowed = true;
}

public void deploy() {
deploySolenoid.set(true);
stowed = false;
}

public boolean isStowed() { return stowed; }
}

Usage: Call stow() before climb or when crossing obstacles; gate climb/paths on isStowed().