VEX C++ Programming Pneumatics

#1

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

0 Likes

#2

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.

0 Likes

#3

You can program pneumatics

0 Likes

#4

Create an instance of digital output class then use the set method.
http://help.vexcodingstudio.com/#cpp/namespacevex/classvex_1_1digital__out/set

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

0 Likes

#5

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

#6

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

0 Likes

#7

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

0 Likes

#8

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 );
    }

    this_thread::sleep_for(10);
  }
}
2 Likes

How to code for Pneumatic in VCS
#9

Thank You for giving some example code!

0 Likes

#10

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

0 Likes

#11

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

0 Likes

#12

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

0 Likes

#13

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

0 Likes

#14

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

0 Likes

#15

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.

0 Likes