Does anyone have any idea how to work pneumatics on the new VexCode? I am trying to put it on the list of configured devices and it isn’t part of the three wired ports.
If anyone can help that would be nice. Thank you!
Does anyone have any idea how to work pneumatics on the new VexCode? I am trying to put it on the list of configured devices and it isn’t part of the three wired ports.
If anyone can help that would be nice. Thank you!
It may be necessary to configure them manually; see the vex::pneumatics class.
I’m not sure. We have a pneumatics system, but we haven’t used it in forever. I could ask the people that used it a couple of years ago though.
I’m not the best at setting up code just from looking at the API. But it did help me with the auto and driver control for how they will run.
And I try to follow the API but it is very confusing
@d_hums I know it has been about a month since your last reply but one of our other teams recently setup their pneumatic system and I would be happy to walk you through the coding part of that
Yes I would love that. Is there anyway I can reach you?
so as far as setup goes in your robot-config.h file you should add the following line.
extern pneumatics NAME_OF_OBJECT;
Replace NAME_OF_OBJECT with whatever variable name you want your object to be called. Then in robot-config.cpp put the following code in
pneumatics NAME_OF_OBJECT = pneumatics(triport::A);
Replace the A after triport with the 3 wire port letter that you are using. Now that the device is setup I will show you the commands to open and close the system.
NAME_OF_OBJECT.open(); //allows airflow into the system extending the arm
NAME_OF_OBJECT.close() //closes airflow into the system unextends the arm
And that is it! It may be reversed so open retracts the arm and close extends it I forget but the code all works. Best of luck!