Hi,
I’m working on pneumatics for my robot, but the code doesn’t seem to control the pneumatics (or does strangely). When the code runs, the pneumatic immediately extends (it should be retracted in the code) and isn’t controlled by the actual code, and then retracts/releases once the code stops. I managed to simplify it to the following minimum reproducable example, is there something I’m doing wrong in trying to control the pneumatics? (The pneumatics should be in analog port A)
void initialize() {
pros::ADIDigitalOut pneumatics ('A');
}
void opcontrol() { // Should retract, extend, retract, extend, and retract the pneumatic, 1 second each time
pros::ADIDigitalOut pneumatics ('A');
pneumatics.set_value(false);
pros::delay(1000);
pneumatics.set_value(true);
pros::delay(1000);
pneumatics.set_value(false);
pros::delay(1000);
pneumatics.set_value(true);
pros::delay(1000);
pneumatics.set_value(false);
}