Is it possible to program our controller to change the drivetrain direction when a certain button on the controller is pushed? we’d like to be able to make the back of the robot the front and visavera quickly so it can make driving easier. is it possible and if so, how?
Here’s a simple explanation on how this can be done: Reversing Drive Code | Rolling Robots
I believe it is possible with some coding if you have skilled coders they should be able to do it, again I’m not exactly sure how
If you use blocky and want a simple way just use bootleans
If you’re on vexcode pro c++, make a integer variable that multiplies itself by -1 when a button is clicked. then enable expert robot config and change the code to this:
LeftDriveSmart.setVelocity(drivetrainLeftSideSpeed * backwards, percent);
and
RightDriveSmart.setVelocity(drivetrainRightSideSpeed * backwards, percent);
That’s what I did at least! lmk if you need help, or if you’re not on VEXcode Pro
Yes there is, if you use C++, you can change it to make the code that runs the drivetrain a different direction by making a new code that is a different direction and code a button to run the code if button pressed=true and add button=pressed makes false for the other code.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.