๐Ÿ’ป Programming ยท EZ Template ยท Intermediate

Auton Selector Setup & Strategy

27 pages on this site mention the auton selector. Here's how to actually set it up โ€” declare routines, register them, use the Brain screen at the field, and recover if you forget to select one.

Why one program beats many: Some teams upload a different program for each auton. Every time you change PID constants or driver code, you re-upload 4+ programs. Under tournament pressure you will upload the wrong one. One program with a selector eliminates this entirely.
๐Ÿ“บ Interactive Brain Screen Simulator

This is what the EZ Template auton selector looks like on the V5 Brain. Click the โ† โ†’ buttons to navigate pages. The highlighted page runs when autonomous is enabled.

V5 BRAIN ยท PROGRAM: ROBOT-2026
โ—€ โ–ถ to select ยท Current: page 0
๐Ÿ“ The Three Files You Edit

Setting up the auton selector touches three files. Here's the complete pattern:

Step 1 โ€” Write the functions in autons.cpp:

// src/autons.cpp
void DoNothing() {
  // Safe fallback โ€” always register this one first
}

void MatchLeft() {
  chassis.pid_drive_set(24_in, DRIVE_SPEED, true);
  chassis.pid_wait();
  chassis.pid_turn_set(90_deg, TURN_SPEED);
  chassis.pid_wait();
  // ... more moves
}

void MatchRight() { /* mirror of MatchLeft */ }

void AWP() { /* auton win point routine */ }

void Skills() { /* 60-second skills run */ }

Step 2 โ€” Declare them in autons.hpp:

// include/autons.hpp
#pragma once
void DoNothing();
void MatchLeft();
void MatchRight();
void AWP();
void Skills();

Step 3 โ€” Register in initialize() in main.cpp:

// src/main.cpp โ€” inside void initialize()
ez::as::auton_selector.autons_add({
  {"Do Nothing\n\nSafe fallback",          DoNothing},
  {"Match Left\n\nStart: tile A1",          MatchLeft},
  {"Match Right\n\nStart: tile A6",         MatchRight},
  {"AWP\n\nAuto Win Point routine",          AWP},
  {"Skills\n\n60-second run",               Skills},
});
The \n\n in the name: The first line is the big title on the Brain screen. Text after \n\n appears smaller below it โ€” use this for start position or notes. Keep names short โ€” the screen only shows ~20 characters cleanly per line.
๐Ÿ† Tournament Field Workflow
  1. Before queueing: At the pits, verify your selected auton is correct. Navigate with Brain screen buttons. The currently displayed page is what runs.
  2. At the field: Plug into the field controller. The Brain screen stays on whatever you left it. You can still change pages after plugging in โ€” right up until the match starts.
  3. If you forget to select: "Do Nothing" registered first = page 0 = default when powered on. This is the safe fallback. You will not accidentally run Skills in a qualification match.
  4. SD card persistence: If an SD card is in the Brain, EZ Template saves which page was last selected and restores it on power-up. No SD card = always starts at page 0.
Naming convention that actually works: Use MatchLeft, MatchRight, AWP, Skills, DoNothing. Capital letter start, no spaces. Consistent naming = any team member can find the right auton in the dark, 30 seconds before a match.
๐Ÿ“–
OFFICIAL EZ TEMPLATE โ€” AUTON SELECTOR REFERENCE
Complete API including limit switch support, SD card persistence, and blank page callbacks
๐Ÿ“บ Auton Selector API โ†’ โšก Using EZ Tutorial โ†’
⚙ STEM Highlight Computer Science: State Machines & Human-Computer Interaction Design
The EZ Template auton selector is a state machine with a display interface. The Brain screen presents a state (current auton selection), and joystick input triggers state transitions (next/previous routine). This pattern — state storage, transition triggers, and output display — is identical to how operating systems manage application state. Good selector design minimizes the steps required to reach the correct auton, especially under the time pressure of a tournament queue.
🎤 Interview line: “Our auton selector is designed for the worst case — a queuing situation with 60 seconds before the match. We ordered routines by usage frequency so the most-used option is always one button press away. We also label each routine on the Brain screen with its expected score and alliance color, not just a number. This reduces human error during tournament selection.”
Why is the order of routines in your auton selector important for tournament performance?
⬛ The first routine always runs during autonomous — order determines which one executes
⬛ Routines run faster when listed first because they load into memory first
⬛ Under time pressure in a queue, minimizing button presses to reach the correct routine reduces selection errors — most-used routines should be easiest to reach
📝
Notebook entry tip: Build & Program — Orange slide — Document your auton selector design as a programming entry: list each routine name, its expected score, and the button sequence to select it. Include a screenshot of the Brain screen display. This entry shows judges that your tournament preparation extended to software UX — a detail that separates experienced teams from beginners.
← ALL GUIDES