← All Guides · Setup: VS Code + PROS + EZ Template
V5RC · VEX Robotics Competition

Code Your Robot
Like a Pro

VS Code · PROS · EZ Template — Complete Setup Guide

🤖
What You'll Set Up
Three tools that work together to power your V5RC robot
🖥️
VS Code
Your code editor. Where you write, edit and manage all your robot's source files.
⚙️
PROS
The programming environment. Compiles C++ and uploads code to your V5 Brain.
🚗
EZ Template
A PROS library with pre-built drive, auton selector, and chassis control code.
INFO Why use this stack instead of VEXcode?

VEXcode is beginner-friendly but limited. The PROS + VS Code stack gives you:

  • Full C++ with no restrictions — use any library or feature
  • Git version control for team collaboration
  • Intelligent autocomplete, IntelliSense, and error highlighting
  • EZ Template's auton selector, PID tuning, and chassis abstractions
  • Faster compile and upload speeds
Most competitive V5RC teams at the Worlds level use PROS. Learning it now puts you ahead.
INFO What you need before starting
OS
Windows 10/11, macOS, or Linux
Hardware
VEX V5 Brain + USB cable
Internet
Required for installs
Time
~30 minutes total
🖥️
Visual Studio Code
Install and configure your editor
STEP 01 Download and Install VS Code

Go to code.visualstudio.com and download the installer for your OS.

Run the installer. On Windows, check these options during install:

  • ✅ Add to PATH
  • ✅ Register Code as an editor for supported file types
  • ✅ Add "Open with Code" to right-click context menu
💡 The "Add to PATH" option is important — it lets you run code . from a terminal to open any folder.
STEP 02 Install the PROS Extension

The PROS extension connects VS Code to the PROS toolchain.

  1. Open VS Code
  2. Press Ctrl+Shift+X (or Cmd+Shift+X on Mac) to open Extensions
  3. Search for "PROS"
  4. Install the extension by PROS Development Team
The PROS extension automatically installs the compiler toolchain and the pros CLI the first time you use it.
STEP 03 Recommended Extra Extensions

These aren't required, but they make coding much smoother:

Extension
C/C++ (Microsoft)
Extension
GitLens
Extension
Better Comments
Extension
Bracket Pair Colorizer
💡 C/C++ (Microsoft) is the most important — it gives you IntelliSense, which shows autocomplete and error squiggles as you type.
STEP 04 Learn the VS Code Layout

Key areas you'll use constantly:

  • Explorer (Ctrl+Shift+E) — Browse your project files
  • Terminal (Ctrl+`) — Run PROS commands
  • Command Palette (Ctrl+Shift+P) — Run any command by name
  • PROS Sidebar — Click the PROS icon on the left bar for quick actions
⚠️ Save files frequently with Ctrl+S. PROS will compile from disk, so unsaved changes won't be included.
⚙️
PROS
Purdue Robotics Operating System — set up your project
STEP 01 What is PROS?

PROS (Purdue Robotics Operating System) is a free, open-source development environment for VEX V5 robots. It lets you write full C or C++ programs with access to all V5 hardware.

  • Made and maintained by the Purdue ACM SIGBots team
  • Used by the majority of top-ranking V5RC teams
  • Supports motors, sensors, pneumatics, radio, vision sensor, and more
  • Real-time operating system (RTOS) — supports multitasking with tasks
STEP 02 Create a New PROS Project

After installing the extension, create your first project:

  1. Open VS Code and click the PROS icon in the left sidebar
  2. Click "Create New Project"
  3. Choose a folder and project name (e.g. my-robot)
  4. Select the latest PROS kernel version
  5. Click Create — VS Code will scaffold the project
⚠️ If you're using EZ Template (next section), skip creating a blank project here — EZ Template has its own template you'll download instead.
STEP 03 Understand the Project Structure

A PROS project looks like this:

📁 my-robot/ ├── 📁 include/ │ └── main.h ← Declare functions/globals here ├── 📁 src/ │ ├── main.cpp ← Your main code │ ├── autons.cpp ← Autonomous routines │ └── robot-config.cpp ← Motor & sensor setup ├── 📁 firmware/ ← PROS kernel (don't edit) └── project.pros ← Project config file
STEP 04 Build and Upload to Your Robot

Connect your V5 Brain via USB, then use these commands in the terminal:

pros build # Compile your code pros upload # Upload to V5 Brain pros build-upload # Compile AND upload in one step pros terminal # Open serial monitor (view print output)

Or use the PROS sidebar buttons — Build, Upload, and Build+Upload are available with one click.

Green text in the terminal means success. If you see red errors, check the error messages — they'll point to the exact file and line number.
STEP 05 Key PROS Functions to Know

These are the most common PROS functions for V5 hardware:

// Motors pros::Motor left_motor(1); // Port 1 left_motor.move_velocity(200); // -600 to +600 RPM left_motor.move_voltage(12000); // -12000 to +12000 mV left_motor.brake(); // Controller pros::Controller controller(pros::E_CONTROLLER_MASTER); int leftY = controller.get_analog(ANALOG_LEFT_Y); // Sensors pros::Imu imu(10); // IMU on port 10 pros::Rotation rot(5); // Rotation sensor pros::Distance dist(3); // Distance sensor // Tasks & Delays pros::delay(20); // Wait 20ms pros::Task myTask(myFunction); // Run function in parallel
🚗
EZ Template
Pre-built chassis control, auton selector & PID library
STEP 01 What is EZ Template?

EZ Template is a PROS library created by EZ-Robotics that gives you a fully working drive system out of the box, so you can focus on strategy instead of low-level code.

It includes:

  • 🎮 Driver control — tank, arcade, single-stick drive modes
  • 📍 Autonomous PID movements — drive forward/turn/swing with tunable PID
  • 📋 Autonomous selector — choose auton on the brain's screen before match
  • 🧭 Odometry support — track your robot's position on the field
  • 🔧 Easy configuration — just list your motor ports and go
STEP 02 Download the EZ Template Project

EZ Template provides a ready-to-use example project to start from:

  1. Go to github.com/EZ-Robotics/EZ-Template
  2. Find the latest release and download EZ-Template-Example-Project.zip
  3. Unzip the folder and open it in VS Code (File → Open Folder)
  4. VS Code will detect it as a PROS project automatically
💡 Always start from the example project, not a blank PROS project. It already has all the EZ Template files wired up correctly.
STEP 03 Configure Your Drive in robot-config.cpp

Open src/robot-config.cpp and set your motor ports. This is the main file you edit to match your physical robot:

// Example: 3-motor left, 3-motor right drivetrain ez::Drive chassis( // Left motors — negative = reversed {-1, -2, -3}, // Right motors — positive = forward {4, 5, 6}, // IMU port 7, // Wheel diameter (inches), external gear ratio 3.25, 1.0 );
⚠️ Negative port numbers (-1, -2) reverse that motor's direction. Get this right or your robot will drive sideways!
STEP 04 Set Up Driver Control in main.cpp

In src/main.cpp, inside the opcontrol() function, add your driver control loop:

void opcontrol() { while (true) { // Tank drive: left stick left side, right stick right side chassis.opcontrol_tank(); // OR: arcade drive (one stick controls both) // chassis.opcontrol_arcade_standard(ez::SPLIT); pros::delay(ez::E_TASK_DELAY); // Always include this! } }
💡 The pros::delay(ez::E_TASK_DELAY) line is critical — it prevents the loop from using 100% CPU and causing issues with other tasks.
STEP 05 Write Autonomous Routines in autons.cpp

In src/autons.cpp, write your autonomous functions using EZ Template's movement commands:

void my_auton() { // Drive forward 24 inches chassis.pid_drive_set(24_in, DRIVE_SPEED); chassis.pid_wait(); // Turn right 90 degrees chassis.pid_turn_set(90_deg, TURN_SPEED); chassis.pid_wait(); // Drive forward another 12 inches chassis.pid_drive_set(12_in, DRIVE_SPEED); chassis.pid_wait(); }

Then register it in the auton selector in initialize():

ez::as::auton_selector.autons_add({ {"Drive Forward\ 6 Inch Side", my_auton}, {"Do Nothing", default_constants}, });
The auton selector shows on the V5 Brain screen. Use the arrows to pick your auton before a match — no re-uploading needed!
STEP 06 Tune Your PID Constants

PID tuning makes your autonomous movements accurate. In autons.cpp, find default_constants():

void default_constants() { // Drive PID chassis.pid_drive_constants_set(10.0, 0.003, 100.0); // kP kI kD // Turn PID chassis.pid_turn_constants_set(3.0, 0.05, 20.0); // Heading correction chassis.pid_heading_constants_set(11.0, 0.0, 20.0); }

Quick tuning guide:

  • kP (Proportional) — Increase if robot undershoots; decrease if it overshoots
  • kD (Derivative) — Increase to reduce oscillation/wobbling at the end
  • kI (Integral) — Usually keep very small or 0; helps with steady-state error
🚀
Your First Full Program
A complete working robot program from scratch
STEP 01 Full Workflow Checklist

Follow this checklist every time you set up a new robot or season:

  • ☐ Install VS Code + PROS extension
  • ☐ Download EZ Template example project
  • ☐ Open project in VS Code
  • ☐ Edit robot-config.cpp — set motor ports, wheel size, gear ratio
  • ☐ Run pros build-upload — verify the robot drives
  • ☐ Tune drive PID using default_constants()
  • ☐ Write first auton in autons.cpp
  • ☐ Register auton in the selector
  • ☐ Test and iterate!
STEP 02 Adding Extra Mechanisms (Intake, Catapult, etc.)

Beyond the drivetrain, you'll want to control other mechanisms. Add motors in robot-config.cpp:

// In robot-config.cpp pros::Motor intake(8, pros::E_MOTOR_GEAR_GREEN); pros::Motor catapult(9, pros::E_MOTOR_GEAR_RED);

Then control them in opcontrol():

// In main.cpp opcontrol() if (master.get_digital(DIGITAL_R1)) { intake.move_voltage(12000); // Full speed forward } else if (master.get_digital(DIGITAL_R2)) { intake.move_voltage(-12000); // Full speed reverse } else { intake.brake(); }
STEP 03 Useful Terminal Commands Cheatsheet
pros build # Compile only (check for errors) pros upload # Upload to Brain pros build-upload # Compile + upload pros terminal # Serial monitor (debug prints) pros conductor upgrade # Update PROS kernel pros c fetch ez-template@x.x.x # Fetch/update EZ Template
💡 Use printf("value: %d\ ", myVar); in your code, then run pros terminal to see debug output in real time over USB.
STEP 04 Common Errors and Fixes

Robot not responding after upload?

  • Ensure the Brain is on and connected via USB-micro
  • Try a different USB port or cable
  • Reinstall VEX USB drivers if on Windows

Motors moving wrong direction?

  • Add a - before the port number in your chassis constructor to reverse it

Auton drifting or inaccurate?

  • Calibrate the IMU: chassis.imu_calibrate(); in initialize()
  • Retune PID kP and kD values

Build errors / red squiggles everywhere?

  • Run pros build in the terminal for detailed error output
  • Make sure C/C++ extension is installed and IntelliSense is initialized
The PROS Discord (discord.gg/pros) and EZ Template Discord are incredibly helpful communities. Don't hesitate to ask!
LINKS Essential Resources
VS Code
code.visualstudio.com
PROS Docs
pros.cs.purdue.edu
EZ Template Docs
ez-robotics.github.io/EZ-Template
EZ GitHub
github.com/EZ-Robotics/EZ-Template
PROS Discord
discord.gg/pros
VRC Forum
vexforum.com
⚙ STEM Highlight Technology: Build Systems, Toolchains & Dependency Management
The PROS development environment is a complete software toolchain: VS Code (editor) → PROS Extension (build system wrapper) → ARM-GCC compiler (cross-compiler targeting V5 ARM CPU) → GNU Linker (combines objects + libraries) → PROS CLI (upload via USB). Each step in this pipeline has a specific purpose. Cross-compilation — compiling on an x86 PC for an ARM target — is required because the V5 Brain uses a different processor architecture than your laptop. EZ Template is a dependency managed by the PROS package system — analogous to npm in JavaScript or pip in Python.
🎤 Interview line: “The PROS toolchain uses cross-compilation — we compile on a PC with an x86 processor but target the V5 Brain’s ARM processor. EZ Template is a managed dependency, like a package in npm or pip. Understanding the toolchain lets us diagnose build failures by knowing which stage failed.”
🔬 Check for Understanding
EZ Template is added to a PROS project as a “template.” This is most analogous to what concept in mainstream software development?
A plugin that modifies VS Code’s editor
A package dependency (like npm install or pip install) that provides pre-built library code your project can use
A code template that generates boilerplate for you to fill in
A compiler plugin that adds new language features
▶ Next Step: Write Your First Code

Your environment is set up. Now open a project, read real code, and write your first autonomous in one guided session.

First 30 Minutes in VS Code →
Related Guides
🚀 First 30 Minutes → 💻 Laptop Setup Guide → 🧩 Blocks → Text Code →
← ALL GUIDES