So my year is about to start as the coder for my robotics team and this game we need pneumatics but the thing is I have no clue on how to code them I’m using block code can anyone explain how it works. Thanks a lot.
Happy birthday! Thankfully, coding pneumatics is really simple once you know the basics.
The first thing you need to do is add the solenoid as a device. As you’ve probably discovered there is no solenoid like there is a motor you’ll need to click on 3-wire then digital out, as these images show.
Once you’ve added the device you’ll see a new block in the 3-wire section.
This is the block you will use to control the solenoid. (Note, in my image it’s says Set Solenoid low, that is because I named my digital out device Solenoid if you did not name your device it will say something like DigitalOutA)
With this block you can do two things you can set the digital output to low, which means the piston would retract, or set it to high, which would extend the piston.
Here is an example of how you could code it so if you click R1the piston retracts and if you click R2 the piston extends.
Hope this helps, if you have any questions lmk.




