Autonomous questions

Hello, I am going to program an autonomous for my team, and I am wondering what the commands for moving motors are(rev and fwd)? Also, you use a sleep command to let them run for a certain amount of time, right? Thanks! Also, any other tips would be appreciated.

What language and studio are you using?

1 Like

Vexcode V5 Text


1 Like

LeftMotor.rotateFor(1000,rotationUnits::deg,55,velocityUnits::pct, false);
RightMotor.rotateFor(-1000,rotationUnits::deg,55,velocityUnits::pct, false);
Leftback.rotateFor(1000,rotationUnits::deg,55,velocityUnits::pct, false);

This is a basic movement command that I used on my TP bot last year. I used the built in encoders to measure how far it went, the measurement for that is the rotation units. Velocity units is the power that the motor is moving at out of 100. I had mine set to 55 to keep it slow so it didn’t pop wheelies or over turn when turning to keep it consistent.
This is a basic command. I’m not the greatest programmer, but I managed to get this to work pretty well for me.


Ok, thanks! Also, making sure, you use sleep commands to let it run for a certain amount of time? and instead of Leftmotor etc. ill use front_left_motor or something around those lines?

most people use sleep commands, but I never did. That was probably a mistake, as I said I’m not the most proficient programmer.
And yeah Leftmotor was just what I named my motor, you place whatever you named the motor at that point.