The Competition Template is an example project that has blocks already included to communicate with the Field Control System during competitions, ensures blocks are in compliance with field regulations, and aids in setting up projects in order to avoid complications and disqualification ("competition" refers to a VRC event using the official field control hardware).
Here are the different sections for understanding the competition template:
- Open the Competition Template from the Examples Page
- Three sections of the template: Pre-autonomous, Autonomous, and Driver Control
- Use the When Started Block for any pre-autonomous setup
- When Autonomous
When Driver Control
Open the Competition Template from the Examples Page
Three sections of the template: Pre-autonomous, Autonomous Mode, and Driver Control
Note: In order for your project to work at a competition, you must leave these hat blocks in your project. The hat blocks can be moved around, but must stay somewhere in the project. Create stacks from these hat blocks.
Use the When Started Block for any Pre-autonomous Setup
The “When Started” hat block is used for any set-up your robot may need such as calibrating a gyro, setting variables, or other device settings. These blocks will run immediately when the project is started, before the autonomous portion of the match begins.
Note: If no setup is needed, the “When Started” stack can remain empty.
The “When Autonomous” hat block is used for controlling your robot during the autonomous portion of a VRC match. Blocks attached to this stack will run when the match begins the Autonomous period.
Note: If no Autonomous routine is desired, the “When Autonomous” stack can remain empty.
When Driver Control
The “When Driver Control” hat block is used for controlling your robot during the driver control portion of a VRC match. Blocks attached to this stack will run when the match begins the Driver Control period.
Note: The “forever” loop is shown above as most users will place conditional C-Blocks in this stack to respond to input from the V5 Controller.