//lIFT Control
if(Controller1.ButtonL1.pressing()) {
LiftL.spin(vex::directionType::fwd, LiftLSpeedPCT, vex::velocityUnits::pct);
LiftR.spin(vex::directionType::rev, LiftRSpeedPCT, vex::velocityUnits::pct);
}
else if(Controller1.ButtonL2.pressing()) {
LiftL.spin(vex::directionType::rev, LiftLSpeedPCT, vex::velocityUnits::pct);
LiftR.spin(vex::directionType::fwd, LiftRSpeedPCT, vex::velocityUnits::pct);
}
else {
LiftL.stop(vex::brakeType::coast);
LiftR.stop(vex::brakeType::coast);
}
vex::task::sleep(20); //Sleep the task for a short amount of time to prevent wasted resources.
This right here is an infinite loop. the rest of your code is not executing. Itâs already in a while loop, so you shouldnât need another one for this if statement.
Additionally, your âLIFT CONTROLâ is outside the scope of your larger, still infinite, while loop. That code also needs to be in the loop to run
Um you replied to the post that includes an exact answer. Also you may be confusing solenoids with the pneumatic cylinders. Solenoids are the controllers for pneumatic cylinders. they are the gates for air to flow through in order to open and close the cylinder.
I have never used Vex V5 Pro or C++ at all. I just got pneumatics and so a was wondering if you could you show me a video and a photo of your code. I have been trying to figure out how to use pneumatics for our auto.