My team wants me to code a single acting piston but how is this different from double

I code using Python as it is a language I am familiar with. My team was looking to implement some pneumatics and I was able to find that you can set pneumatics to True or False to extend and retract them. I have my code start by setting the digital_out_a to False to retract the piston. My driver wanted to use x to extend and retract so I made it when x is pressed the digital out is set to True wait 1 second and set it to False. After this, I downloaded the code to the robot with no issue but once we tried filling the cylinder with air it was leaking from somewhere. I was told by my builder that this was a programming error and that I had it coded for a double piston actuator thing when it needed to be a single. I then asked one of my friends about this and he said the issue was a build error. So in short, I need to know if my issue is a build or code issue and how to fix the code to accommodate this as it caused some tension in my team.

There is no difference in code for single or double acting air cylinders. Single acting cylinders retract with a spring, while double acting cylinders use air to extend and retract. Air leaks are a plumbing problem…check that all connections are tight and the air hose is cut straight and neat before pushing into fittings.

5 Likes

Thanks, I talked to my team and two of the tubes were swapped around and we were able to fix it and the code worked just fine.

1 Like