V5 Autonomous Program

How do you start an autonomous program with the new v5 system

check out main{} in the competition template

Do we have to use an autonomous switch?

To start program in the v5 brain


No you do not. When you turn on the brain there is a menu, click on the program folder and then click on your program. Then you will have the option to run, run timed or run competition. Pressing RUN TIMED should start the program starting will autonomous. Or you could use the RUN COMPETITION to run a programming skills run.

When you first open up the VCS, go to the example program instead of choosing what language you are going to use. After that, scroll down and click on Competition option and press choose. After you’ve done that, select what language it should open up the template in.

If you want to start your own, make sure you include

vex::competition    Competition; 

Then when you make your user control and autonomous void (make sure user control*** of them have a loop in the end so it doesn’t quit the void)

In your main, plug the pre auton first if you have it, and then write


in the end, add a loop that sleeps for 20Msec so it doesn’t exit the main until turned off.

Thanks that helps a lot

When and why are you recommending a loop that sleeps for 20Msec so it doesn’t exit the main until turned off?

int main() {


    while (1) {

After compiling the program on to the brain, turn on your controller and click the right arrow go to the programs section. Make sure your controller is paired with the V5 brain on your robot. Then select the programs section by clicking A. Then select the program you downloaded by clicking the left and right arrows until you get to it, and then click A. Then select timed run, by scrolling right once and clicking A. It will show you that there is 15 seconds for autonomous and 1:45 for driver control. Click A, and then it will start the program. Don’t forget to position your robot first!

no you can do it from the controller

Sorry to inform you but this topic is 12 months old, since it is your first time I will tell you that this is called reviving dead threads and is not looked favorably upon. Just keep in mind that if a topic that is a couple of months old and the discussion has died is usually not good to revive.
Thank you
@DRow lock?