VexV5 arm bot Code

image

I am trying to recode the vex V5 arm bot to practice coding C++ but I can’t find a way to get the arm to stay in position once I raise it or lower it. It always just falls, i’ve tried many different break codes and none have worked.

Have you tried motor.stop(hold)?

Welcome to the forums!

You can put these two lines of code wherever you need it (seems like you are gonna put it above the bottom comment)
motor8.setstopping(hold);
motor8.stop();

This will make it so the stopping “mode” is hold, which means it will do all it can to stay in the same position while stopped, then it will tell the motor to actually do the stopping.

Hope this helps!

1 Like

yes I have and it isn’t working. I have it under else in my if, else if, else. It still does not work