VEX C++ Programming Pneumatics

Is there anyway we can program Pneumatics on the new V5 Cortex?

My first reply is that, Yes, but I don’t know exactly how to as yet.
My second reply is, at the risk of being a troll, it is NOT the V5 “Cortex”. It is V5 and it is replacing the “Cortex”. The part on the robot is known as the V5 Brain or V5 Robot Brain. Proper use of terminology promotes better communication.

You can program pneumatics

Create an instance of digital output class then use the set method.

I’ll post some code tonight if you still need help.

1 Like

Since we’re getting caught up in pedantry :slight_smile:

In fact, you’re creating a program which gets run on an Arm Cortex core. It’s not the same product known as the VEX ARM Cortex-based Microcontroller (this very generic name also fits the V5 Brain). But yeah, you’re technically programming a V5 Cortex. It’s almost as equally right as it is wrong.

1 Like

@jpearman Yeah, that would be great if you could post some code.

@jpearman A page of code would be much appreciated, thank you.

Like this. You may need to reverse logic.
This uses the last three wire port, change as necessary.

digital_out dig1 = digital_out( Brain.ThreeWirePort.H );

int main() {
  int count = 0;

  while(1) {
    if( Controller1.ButtonL1.pressing() ) {
      dig1.set( true );
    else {
      dig1.set( false );


Thank You for giving some example code!

Thank you! much appreciated, helped our E team out a lot.

I wounder what you guys are using pneumatics for. If you still need help with the programming we just got ours all good. I can send code if you need

I tried using this code but it did not work. is there something in motor centers set up I have to do?

nothing else to do.
pneumatics driver should be plugged into port H on the V5 brain.
Are you using VCS or VEXcode ?

What is vcs is that required? And how is it different from vex code

VCS = VEX coding studio, programming IDE for the VEX V5 system.

VEXcode, a new text only programming environment for the VEX V5 system.

This topic was discussing programming pneumatics on the V5 using Vex coding studio, so I assume that’s what you are using.

Hello I have a question, so Is this for vex c++ or c++ pro?

It will function the same regardless

Hello sorry for bothering u but how will the pneumatic retract

If you can add some code please do just as an example

In the code from jpearman the L1 button extends and letting go of the button retracts it. (Or vice versa - you’ll have to test it)