🧠 Brain Download Guide

Upload Code to the V5 Brain

How to connect your laptop, compile your PROS project, upload it to the Brain, and use EZ Template's auton selector on competition day.

1
Connecting
2
Build & Upload
3
Auton Selector
4
Troubleshoot
// Section 01
Connecting Your Laptop to the V5 Brain
Before you can upload code, the Brain needs to be visible to PROS on your laptop. This is a physical and software connection — both must work.
💡
Always use the correct cable. The V5 Brain uses a micro-USB cable (the same connector as many older Android phones). Not USB-C, not mini-USB. A bad cable is the single most common reason uploads fail. Keep a known-good cable in your team bag.

Two Ways to Connect

Method 1 — Direct USB
Brain to laptop (micro-USB)
Plug micro-USB into the V5 Brain's front port, USB-A end into your laptop. Used for most uploads during practice. Brain must be powered on.
Method 2 — Controller USB
Controller to laptop (micro-USB)
Plug into the V5 Controller instead. The controller must be paired to the Brain. Useful when the Brain is hard to reach inside the robot frame.

Step by Step: Verify the Connection

1

Power on the V5 Brain

Press the power button. The Brain must show the home screen — not just "charging." PROS cannot communicate with a Brain that is off or in sleep mode.

2

Plug in the micro-USB cable

Connect the micro-USB end firmly into the Brain's front port. Connect the USB-A end to your laptop. If you are using a USB-C laptop, use a USB-C hub that has a USB-A pass-through — not all adapters work reliably.

3

Open VS Code and verify detection in PROS

Open your PROS project in VS Code. Look at the bottom status bar — PROS shows a device indicator when the Brain is connected. You can also run pros v5 info-brain in the terminal to confirm detection.

4

If nothing is detected

Try a different USB port on your laptop. Try a different cable. Check that the Brain is fully on. On school laptops, the USB driver for V5 may need to be installed — ask your coach if this happens repeatedly on a specific machine.

// Section 02
Build and Upload Your Program
PROS compiles your C++ code into a binary and sends it to the Brain. You can do this from VS Code buttons or from the terminal.

The Three Commands You Need

# Method 1 — VS Code PROS toolbar (easiest) # Click the PROS icon in the left sidebar # Then click "Build and Upload" (rocket icon) # Method 2 — VS Code terminal (Ctrl+` to open) pros build # compile only — check for errors first pros upload # upload previously built binary pros build-upload # compile AND upload in one step (most common) # Method 3 — keyboard shortcut after clicking the PROS panel # Ctrl+Shift+P → "PROS: Build and Upload"
ℹ️
Always check the terminal output. After running pros build-upload, read the output. A successful upload ends with Uploading... done. If you see error: lines, the upload did not succeed and the Brain is still running your old code.

What Happens During an Upload

  1. Compile: PROS converts your C++ source files into machine code. Any syntax errors stop this step and appear in red in the terminal.
  2. Link: The compiled code is linked with the PROS kernel and EZ Template library into a single binary file.
  3. Upload: The binary is transferred to the V5 Brain over USB and written into the Brain's program slot (default: slot 1).
  4. Ready: The Brain shows the program in its program list. It runs automatically when enabled by a competition controller or when you press "Run" on the Brain screen.

Managing Multiple Program Slots

The V5 Brain supports up to 8 program slots. Each slot holds one compiled program. This is useful for keeping a competition program in slot 1 and a test/debug version in slot 2.

# Upload to a specific slot pros upload --slot 2 # upload to slot 2 pros upload --slot 1 # default — competition program # Or set the slot permanently in your project settings: # project.pros → "slot" → change the number
Competition-day habit: upload to slot 1 the night before or morning of the event, test it runs correctly, then do not touch it. Any last-minute changes go to slot 2 first. If the change breaks something, your slot 1 competition program is still intact.
// Section 03
Using the EZ Template Auton Selector
EZ Template's built-in auton selector lets you pick which autonomous routine to run directly on the Brain screen — no re-uploading needed between matches.
🏆
This is a real competitive advantage. Teams without an auton selector must re-upload code to change their autonomous — taking 1–2 minutes and risking a failed upload. With EZ Template's selector, you switch routes in 5 seconds using the controller joystick.

Step 1 — Register Your Autonomous Routines

In your initialize() function, add each autonomous routine to the selector. The string is what appears on the Brain screen.

// In src/main.cpp — inside initialize() void initialize() { ez::as::auton_selector.autons_add({ {"Blue Left — 14pts", AutonomousBlueLeft}, {"Red Right — 14pts", AutonomousRedRight}, {"Safe Route — 8pts", AutonomousSafeRoute}, {"Skills Run", AutonomousSkills}, }); chassis.initialize(); // ... rest of initialize }

Step 2 — What the Brain Screen Shows

After uploading, when the program is running in disabled mode (before a match starts), the Brain screen shows the auton selector:

EZ TEMPLATE — AUTON SELECTOR
Blue Left -- 14pts
Red Right -- 14pts
Safe Route -- 8pts
Skills Run
Left Joystick: scroll up/down  |  A: confirm

Step 3 — How to Navigate the Selector

  1. Connect the V5 Controller to the Brain (press the power button on the controller).
  2. The selector appears automatically when the program is in disabled mode — you do not need to do anything special to activate it.
  3. Push the left joystick up or down to scroll through the list.
  4. Press Button A on the controller to confirm the selection (or it stays selected automatically — the last highlighted item runs when autonomous starts).
  5. When the field control or competition switch enables autonomous, your selected routine runs immediately.
ℹ️
The selection persists until you scroll to a new one. If you selected "Red Right" for match 3 and do nothing before match 4, the Brain will still run "Red Right." Always verify the selection before each match.

Step 4 — Auton Selector in Your autonomous() Function

In your autonomous() function, call ez::as::auton_selector.call_selected_auton(). This runs whichever routine is currently selected on the Brain screen.

// In src/main.cpp — autonomous() function void autonomous() { // Run whichever auton was selected on the Brain screen ez::as::auton_selector.call_selected_auton(); }
💡
Pre-match checklist: (1) Confirm Brain is running slot 1. (2) Confirm correct auton is highlighted. (3) Confirm robot is in the correct starting position for that auton. All three must be right. A perfect autonomous routine still fails if the robot starts facing the wrong way.
// Section 04
Upload Troubleshooting
Common upload failures and how to fix each one quickly — especially useful on competition day when there is no time to guess.
Error / SymptomMost Likely CauseFix
Brain not detected Cable issue or Brain is off Try a different cable. Confirm Brain is powered on (not just connected to charger). Try a different USB port on the laptop.
Upload starts then fails mid-transfer Bad cable, USB power issue, or laptop going to sleep Use a shorter cable. Disable laptop sleep/USB suspend in power settings. Try direct USB-A port instead of a hub.
Compile error: "expected ';'" Syntax error in your code Read the error line number. Go to that line in VS Code. Look for a missing semicolon, brace, or parenthesis. IntelliSense red underlines will already be showing you the problem.
Compile error: "'chassis' was not declared" Missing header include or file not saved Make sure #include "EZ-Template/drive/drive.hpp" is in your file. Save all files (Ctrl+S) before building.
Upload succeeds but robot does not move Competition switch in disabled mode, or wrong slot selected on Brain Enable driver control on the Brain screen (or use a competition switch). Confirm you are running slot 1 and that opcontrol is wired correctly.
Auton selector not showing on Brain screen autons_add() not called in initialize(), or program not in disabled state Confirm autons_add is called inside initialize(). The selector only shows during the disabled period — not during opcontrol or autonomous.
Wrong autonomous runs at competition Selector not updated before match or controller not connected Always verify selector after connecting controller. The Brain screen must show the correct auton highlighted before the field enables autonomous.
pros: command not found (terminal) PROS not installed or PATH not set Close and reopen VS Code. If still failing, open the PROS panel and run "Install PROS" again. On school laptops, this may require re-running the extension setup.
⚠️
At a competition: never troubleshoot a new problem under time pressure for the first time. If upload is failing, use your backup strategy — slot 2 with a known-working program, or a teammate's laptop. Do not keep retrying the same thing hoping it will suddenly work.
⚙ STEM Highlight Technology: Embedded Systems & Real-Time Operating Systems
The V5 Brain is an embedded system — a computer with a specific, dedicated function. PROS is a real-time operating system (RTOS), meaning tasks are scheduled with guaranteed timing. The competition template hooks (initialize, autonomous, opcontrol) are called by the RTOS at specific, field-controlled moments. This is identical to how industrial robots and medical devices work: hard real-time requirements where a missed deadline causes a physical failure.
🎤 Interview line: “The V5 Brain runs PROS, a real-time operating system. Our code functions are called by the scheduler at precisely defined moments — autonomous starts within milliseconds of field enable. This real-time guarantee is why robotics and industrial control systems use RTOS instead of general-purpose operating systems.”
🔬 Check for Understanding
Why does PROS use a Real-Time Operating System (RTOS) rather than a general-purpose OS like Windows or Linux?
RTOS is cheaper to license
General-purpose OSes are too large to fit on the V5 Brain
RTOS guarantees tasks execute within defined time bounds — critical when a delayed motor command causes a physical robot to fail
RTOS only allows one program to run at a time, which is simpler
🏆 You’re ready to build.

You’ve completed the Getting Started track. You have VS Code, PROS, EZ Template, and a working upload workflow. Now it’s time to join your team and start building something real.

Spartan Hub
Your team’s home base
🏎
Driver
Drills, match sim, pre-check
⚙️
Engineer
Build, program, CAD
📊
Strategist
Scouting, auton, match prep
Related Guides
🖥️ VS Code + PROS Setup → 🚀 First 30 Minutes → 🪾 Clawbot Training →
← ALL GUIDES