Hey everyone,
I have been working on using pneumatics for our robot; it will only be used once in a match so it doesn’t have to be too complex!
I have been trying to use the tutorial found here: https://pros.cs.purdue.edu/cortex/tutorials/pneumatics.html
However, when I have been testing this, I am not able to activate the pneumatics using the button I programmed. I can’t seem to find any other tutorials using PROS, and I was wondering what I was doing wrong.
I will put the code below:
[code=“opcontrol.c”] /*
* Pneumatics Controls
*/
if(joystickGetDigital(1, 7, JOY_DOWN)) {
pneumaticMove();
}
else {
}
[code"pneumatic.c"]
#include "pneumatic.h"
#include "main.h"
void pneumaticMove()
{
digitalWrite(1, LOW);
}
I have also initialized it in init.c
void initializeIO() {
pinMode(1, OUTPUT); // configure digital port 1 as an output
digitalWrite(1, LOW); // write LOW to port 1 (solenoid may be extended or not, depending on wiring)
}
I am not sure what I am doing wrong; I have never used pneumatics before.
Thanks so much for all of the help!