Pnumatics pulling down no matter hat

No matter what we do our pistons on our climb continuously pull down. We recently rewired the pneumatics and now no matter what the code says. I’ve tried setting it to true, I’ve tried setting it to false, I’ve even tried getting rid of it, but as soon as we start the program it pulls down.

I thought it was maybe a building issue but we can turn on and off the solinoid with the selection screen with ease

please help

I would note that I do very little coding but I did code pneumatics in blocks. Instead of using digital output true vs false I used high vs low. Also may want to try the circuit. May be wrong. Also the solenoid only starts control when the program starts. Just try things for that but if all else fails you can extend and un extend in teleop.

Do you mind sharing the code you have written for toggling the pneumatic?

Could you post your code?

One relatively easy way you could check if it is your code is by starting a completely fresh project, and program your solenoid. If the problem goes away, then it is most likely your code. If the problem persists, then It could still be your code (you just did it wrong twice). :person_shrugging:

4 Likes

At the begining of the program i have

climbing.set(False)

and in driver I have

if controller.buttonR1.pressing():
climbing.set(True)

Theres no code for turning it off because its only turned on at the very in

I tried this on and it still didnt work

How do you do high and low? Also it still won;t let us change it even in driver

Probably just because you copy-pasted it but make sure there is a tab before “climbing.set(True)”. I want to make sure it isn’t the wire, put this code inside your user control loop to see if it is actually set, if it is, then double-check the port and try replacing the wire.

Controller.screen.set_cursor(1, 1)
Controller.screen.clear_line(1)
Controller.screen.print_(climbing.value())

If it stays printing false, try replacing the pneumatic class with a DigitalOut class instead.

2 Likes

You can always just use something like this. Not fixing your problem, just getting rid of it. `

if(Controller1.ButtonR2.pressing()){

(however you wonna control your pneumatics but i would recommend just “HangPistons.set(true);”)

wait(50,msec);
}

else
{
HangPistons.set(false);
wait(50,msec);
}

`

2 Likes

in basic vex code setting as digital output (port) you can set the output to high and low. Thats how I did my code.

Did you code them the right way or you put them on the opposite way and double check wiring

Make sure you aren’t doing something like this :

digital_out Pnematics1(Brain.ThreeWirePort.A);
encoder Encoder(Brain.ThreeWirePort.A); // On the same port as the pnematics ( Sensor)
/*
Doing this will cause issues like , piston staying open constantly even though you haven't
told it to. As well as in some cases  not opening and staying closed.
*/
1 Like

hey there, have you solved your issue? if not:

make sure that you are initializing it as a Digital_Out
make sure you fed it the correct 3-wire port
make sure you aren’t using the same 3-wire port elsewhere in robot-config

Let us know if this works :slight_smile:

1 Like

Sorry yall for not getting back to this sooner. We had a limit switch defined in that port that I had forgotten about so it was sending the limit switch signals out which overroad the digital out