Setup Guide

Install VS Code and the VEX Robotics extension, then open the VEXLearn project.

The installation screenshots show Windows.

Follow along in the course setup lab to check your progress as you install the tools.

Installing VS Code

  1. Open the Visual Studio Code download page and choose Download for Windows. VS Code website download page
  2. Open the downloaded installer file
  3. Accept the license agreement and click Next VS Code license agreement screen
  4. On the "Select Additional Tasks" screen, make sure Add to PATH is checked (the rest is optional) VS Code Add to PATH option
  5. Click Install and wait for it to complete VS Code installation progress

You can also use other editors like Antigravity, but VS Code is the most widely tested with the VEX extension.

Installing the VEX VS Code Extension

The VEX Robotics extension adds support for building and downloading VEX programs directly from VS Code.

  1. Open Visual Studio Code
  2. Click the Extensions icon in the left sidebar (or press Ctrl+Shift+X) VS Code Extensions panel in the sidebar
  3. In the search bar, type vex Searching for VEX in the Extensions search bar
  4. Find VEX Robotics (by VEX Robotics) in the results and click Install VEX Robotics extension in search results
  5. Wait for the extension to finish installing

PROS is not supported. VEXLearn only works with the official VEX VS Code extension and V5 platform (not IQ or EXP).

Installing the Template

Prerequisites

  1. Download the VEXLearn Template ZIP
  2. Extract the ZIP file to a location on your computer
  3. Open VS Code, go to File → Open Folder, and open the extracted folder.

    The folder you open must be named VEXLearn Template. When you extract the ZIP, a parent folder may be created with VEXLearn Template inside it. Open the inner folder. If you open the outer parent folder, the VEX extension will not recognize the template.

  4. Let VS Code install the required dependencies automatically.

    If a popup asks "Do you want to install Microsoft's Makefile tools?", click No. Installing it will break the template.

Choose your setup

Follow the section for how you plan to use the template.

For learning without a robot

If you just want to explore how the code works and learn from it, no extra setup is needed beyond installing the template. You're done!

Browse the source files to understand how the template is structured:

  • src/main.cpp: Entry point, thread setup, pre-auton calibration
  • src/drive.cpp: Driver control and button mappings
  • src/movement.cpp: PID-based move and turn functions
  • src/auto.cpp: Autonomous functions
  • src/display.cpp: Brain and controller screen rendering
  • src/robotConfig.cpp: Motor, sensor, and piston objects

For use on a robot

Your robot must meet these hardware requirements:

  • Tank-drive chassis (no X-drive, H-drive, or mecanum)
  • All chassis wheels must be the same size
  • Clear split between left and right chassis motor groups
  • Omni wheels and traction wheels are both fine
  • Must have an inertial sensor
  • Only V5 motors (not EXP or IQ)
  • Only one controller

Robot Setup Checklist

Click each step to mark it complete as you go:

0 / 14 done
  • Go to vex.h and change wheel_2r to your wheel diameter
  • In robotConfig.cpp: add/remove motors with correct gear ratio, port, and direction
  • In robotConfig.cpp: add/remove sensors with correct port number
  • In robotConfig.cpp: add/remove pistons with correct three-wire port
  • In robotConfig.cpp: update motor groups so motor names match
  • In robotConfig.h: declare the same objects defined in robotConfig.cpp using extern
  • In movement.cpp: update the gear ratio in the move function (default is 4/3)
  • In drive.cpp: delete examples, write your button mappings
  • In main.cpp: update pre_auton to calibrate your sensors
  • In display.cpp: remove motors that don't exist, update team name/number
  • Compile the project and confirm that it has no errors (warnings are acceptable)
  • Run on the robot and verify it works. Adjust driver preferences (deadband, sensitivity)
  • In auto.cpp: write a simple PID test function (e.g. move(100, 0, 8);) and tune PID
  • In auto.h: declare your PID tuning function. Robot is ready!

When you're done with setup, start tuning PID for move() and turn() in movement.cpp. See the VEX Concepts → PID section for tuning guidance.

Practice: Find the project folder

Worked example. If VS Code shows just one folder called VEXLearn Template in Explorer, open it and check for src, include, and makefile. Open the folder that contains those items.

Your turn. The ZIP extracted to Downloads/VEXLearn Release/VEXLearn Template. Which folder do you select in File → Open Folder?

Reveal the answer

Open the inner VEXLearn Template folder. It is the project root because it contains makefile, src, and include.