Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pneumatics Not Controllable through 3-Wire Expander #756

Open
ifndef-define opened this issue Mar 8, 2025 · 0 comments
Open

Pneumatics Not Controllable through 3-Wire Expander #756

ifndef-define opened this issue Mar 8, 2025 · 0 comments

Comments

@ifndef-define
Copy link

Came across an issue when I put a pneumatic solenoid cable on the three wire expander, the piston is powered and is not controllable via code. Putting the pneumatic on the brain directly has no issue.

This is the code used to initialize the pistons.

pros::adi::Pneumatics piston1('A', false);
pros::adi::Pneumatics piston2(adi::ext_adi_port_pair_t(7, 'A'), false);

In opcontrol, I simply use buttons to toggle the piston.

void opcontrol() {
   while(1) {
    if (ctrler.get_digital(E_CONTROLLER_DIGITAL_A)) {
       piston1.extend();
       piston2.extend();
    }
    if (ctrler.get_digital(E_CONTROLLER_DIGITAL_B)) {
       piston1.retract();
       piston2.retract();
    }
    delay(10);
   }
}

I used this test code to see the action of the pistons. The one directly on the brain's ADI has no issue and properly functions, however, the piston on the three-wire expander become powered and no longer responds to the program. Toggling the piston via the brain when the program is off works for both pistons, which would rule out a bad solenoid, expander hub, and cables.

This was on PROS 4.1.1 on a Windows laptop. A friend tried on a Mac and the same issue exists. Let me know if any other details are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant