Starting, Downloading, and Running a VEXcode V5 C++ Project

Starting, downloading, and running C++ projects in VEXcode V5 is easy.


How to Start a C++ Project

New Blocks project opened in VEXcode V5.

Launch VEXcode V5. The platform defaults to the Blocks interface.

VEXcode V5 Toolbar with the File menu open and the New Text Project option highlighted. New Text Project is the second option in the menu, below New Blocks Project.

Select ‘File,’ then ‘New Text Project’ to open the text interface.

VEXcode V5 Select a Project Language prompt that has options for Python or C++. Either language can be selected to open a new project, or below there is a Cancel button that will close the menu. The C++ project option is highlighted.

Next, select the C++ project language. There is the option to start a new project in either C++ or Python. Be sure to select C++.

New C++ project opened in VEXcode V5.

The C++ interface will open.


How to Build a C++ Project

This section will show you how to create a basic C++ project using commands from the Tool Box. The project outlined here will drive the V5 Clawbot forward for 200 millimeters (mm).

VEXcode V5 Toolbar with the File menu open and the Open Examples option highlighted. Open Examples is the fifth option in the menu, below New Blocks Project, New Text Project, Open, and Open Recent.

Select ‘File’ then ‘Open Examples' to open a template project.

Thumbnail image for the Clawbot (Drivetrain 2-motor, No Gyro) example project.

Select the Clawbot (Drivetrain 2-motor, No Gyro) template. Templates are blank projects with preset device configurations.

VEXcode V5 with a template Example Project opened, including configured devices and code comments with a description of the project.

Notice that a set of project comments open in the workspace. You will add commands between the ‘int main ()’ brackets - { } - of the project.

VEXcode V5 with the Drive for command highlighted in the C++ Toolbox.

Select the [Drive for] command.

VEXcode V5 with the Clawbot (Drivetrain, 2-motor, No Gyro) template Example Project opened. The previously blank line of code now has a Drive for command in it that reads Drivetrain.driveFor(forward, 200, mm);.

Drag the [Drive for] command into the workspace and place it between the ‘int main ()’ brackets - { } - of the project (line 17).


How to Download and Run a C++ Project

VEXcode V5 Toolbar with the project name field highlighted and renamed to Drive Forward. To the right of the project name a label reads Saved.

First, name and save your C++ project. View one of the following articles for detailed information on how to save a VEXcode V5 C++ project:

VEXcode V5 with the Slots dropdown menu opened. There are 8 available slots for downloading projects to the Brain, and the first slot is highlighted.

Then, choose which of the Brain’s slots you will download the project to. To do this, select the ‘Slot’ button on the Toolbar.

VEXcode V5 Toolbar with the green Brain icon highlighted, indicating that the Brain is connected.

Next, connect the powered Brain to your device (Directly via Micro-USB or via VEX Controller) and check that the Brain icon is green.

VEXcode V5 Toolbar with the Download icon highlighted in between the Brain and Run icons.

Select the ‘Download’ button to download the project to the Brain. The project will download to the chosen slot.

VEXcode V5 Toolbar with the Run icon highlighted in between the Download and Stop icons.

Finally, select ‘Run’ to start the project while the robot is still connected to your computer.

V5 Brain screen is shown in a user program's menu. The Run button is highlighted, and the program's name reads Drive Forward.

Or, disconnect the Brain from your device and run the project on the V5 Brain.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: