How to use pneumatics w/ Lemlib?

I’ve been starting to use PROS and Lemlib, specifically, to code my autons with odom. My robot is a ruiguan style ramp robot, and it has a piston that pulls down a rubber band to score middle. My auton includes scoring middle, so I need to find a way to move that piston down. I’ve been trying multiple ways to pull it downwards, but it only works in opcontrol. Is there a way, probably a command or function to move the piston down in auton?

Lemlib takes care of the tracking and chassis control. But everything else is for you to code. In auton you want to use one of the Lemlib wait for chassis command to trigger regular pros::adi code.

something like:

chassis.moveToPose(10, 25, 270, 2000); //Move to middle goal
chassis.waitUntilDone(); //Wait until chassis finishes all movements
piston.set(true); //Move piston
intake.set_velocity(600); //Score in goal
pros::delay(500); //Give time for intake to run
intake.brake(); //Finish scoring
piston.set(false);
chassis.follow("30PointSoloWinpointPath_txt"); //Move on to next part of auton

Have a look at the docs as there are many differnt types of chassis waits.
LemLib documentation
Without wait code, the code after a chassis move function will be run right away while the movement is being complete. With the wait until distance code you can trigger an action at a specific point while the robot is still moving.

Hope this helps :slight_smile: