Setting up a project

A brand-new coach here, so perhaps I’m asking something obvious, but…

I guess we’re supposed to use a competition template when creating a project, and the template has two “when” blocks, one for auto and one for driver control. First of all, is there any documentation on how those two blocks are triggered in an alliance match and how we could simulate that same environment when practicing solo?
Second, do we re-use the same project or create a new one to run driver and programming skills? Thanks!

Yes! To simulate the disabled, driver, or programming modes you’ll need a competition switch.

And in each of those ‘when’ blocks, it’ll do whatever is in that block when it is called. So for something like driver control you’d need to repeat the loop forever otherwise it’ll end.

While using the competition template and there’s no switch it’ll default to the driver control, and within the driver control, you can call an autonomous routine if you want to simulate a run like that. So the switch isn’t 100% essential for testing but it can be helpful. You might also be able to test the template using the virtual tournament page testing menu, although that’s probably more of a hassle than just calling the autonomous in driver control.

And you’ll want to use the same program for driver skills, as you do in tournaments, as you do for programming skills. However, once you switch to more than 1 autonomous routine you’ll have to either comment the others out or create a way to determine which one runs - a selection process.

I would recommend just using regular code (like vex code pro) right off the bat because complicated processes can be quite difficult to do in blocks.

3 Likes

If you go to the competition tab on the controller. It allows you to simulate an actual tournament and use your autonomous.

2 Likes

So there’s no requirement to use the same routine for programming skills AND for the first 15 sec of alliance matches?

That is correct. There are also different objectives/layouts for skills runs as well. See Appendix B of the game manual for all the details about that.

1 Like

Do we also use the same competition template for skills matches? And does this pairing procedure apply to both alliance and skills matches? In other words, are skills matches started and stopped manually, or by a field controller?

What happens to the running user program when an alliance match transitions from autonomous to driver control? Is it terminated completely and restarted, or is it only the “When Auto” block that gets terminated?

Yes, the same competition template is used for skills matches.


Some events will use the same field control hardware for skills, others will use a competition switch or a spare V5 brain for field control. But whatever field control hardware is used, that hardware will still be responsible for starting and stopping your program, just like in normal matches.


Between the autonomous and driver control periods, the robot will be in the “disabled” state, which is the same state it’s in before and after the match.

When transitioning from autonomous to disabled, all motors will be stopped, and any code running under a “when autonomous” hat will be stopped, but the program as a whole will not be terminated (e.g., code running under a “when started” hat will continue to run). In the disabled state, blocks that move motors or read from the controller have no effect.

When the driver control period starts, the robot will be put in the “driver control” state, at which point those blocks will work again, and code under “when driver control” hat(s) will start running.

7 Likes