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
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.
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).
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.
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.
*/
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
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