So I am a first year programmer for our team and I am having some trouble with the pneumatics in our system. We program using FRC vscode and I have written the code using resources available to me and my limited knowledge of coding. Problem: Our pcm status light is on but the compressor will never kick on. I declared a double solenoid in our programming and declared the right can ports (0,1).
Robotmap:
public static final int THEARM_PITCH_SOLENOID_DEPLOY = 0;
public static final int THEARM_PITCH_SOLENOID_RETRACT =1;
My subsystem named “Thearm”
DoubleSolenoid pitchsolenoid = null;
public Thearm() {
pitchsolenoid = new DoubleSolenoid(RobotMap.THEARM_PITCH_SOLENOID_DEPLOY, RobotMap.THEARM_PITCH_SOLENOID_RETRACT);
}
public void pitchup() {
pitchsolenoid.set(Value.kForward);
}
public void pitchdown() {
pitchsolenoid.set(Value.kForward);
}
public void shiftlow() {
pitchsolenoid.set(Value.kReverse);
}
Armdown command:
public class armdown extends InstantCommand {
public armdown() {
super();
requires(Robot.m_Thearm);
}
@Override
protected void initialize() {
Robot.m_Thearm.pitchdown();
}
}
armup command:
public class armup extends InstantCommand {
public armup() {
super();
requires(Robot.m_Thearm);
}
@Override
protected void initialize() {
Robot.m_Thearm.pitchup();
and then I mapped the commands to my joystick:
public OI() {
D1.whenPressed(new armup());
D2.whenPressed(new armdown());
}
I also declared my subsystem here:
@Override
public void robotInit() {
m_Thearm = new Thearm();
m_oi = new OI();
If you guys have and advice as to what the problem is please let me know. Any help is greatly appreciated.