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

Screenshot of a C++ tutorial from VEX Robotics, displaying code snippets and explanations related to V5 programming. The image illustrates key concepts and examples to assist users in understanding C++ for V5 robots.

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

Screenshot of a C++ tutorial from VEX Robotics, showing code examples and explanations related to V5 programming, with highlighted sections for better understanding.

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

Screenshot of VEX V5 C++ tutorial interface, displaying code examples and programming concepts for robotics development.

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++.

Screenshot of a C++ tutorial from V5 Category Description, showing code examples and explanations related to programming concepts.

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).

Screenshot of a C++ tutorial from VEX Robotics, showcasing code examples and explanations for programming V5 robots, highlighting key concepts and functions.

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

Clawbot template diagram for VEX V5 robotics, illustrating the design and components used in building a Clawbot, intended for C++ programming tutorials.

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

Screenshot of a C++ tutorial from V5 Category Description, displaying code snippets and explanations related to programming concepts.

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

Screenshot of a C++ tutorial interface from VEX Robotics, displaying code examples and explanations related to V5 programming, with a focus on functionality and usage in robotics projects.

Select the [Drive for] command.

Screenshot of a C++ tutorial from V5 Category Description, showing code snippets and explanations related to programming concepts, with a focus on VEX Robotics.

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

Screenshot of a C++ tutorial from VEX Robotics, displaying code examples and explanations related to V5 programming concepts.

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:

Screenshot of a C++ tutorial from VEX Robotics, displaying code snippets and explanations related to V5 category programming concepts.

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

Screenshot of a C++ tutorial from VEX Robotics, illustrating code examples and explanations for programming with V5 robots, featuring highlighted text and code snippets.

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

Screenshot of a C++ tutorial from V5 Category Description, displaying code examples and explanations for programming concepts, with a focus on enhancing understanding of C++ in robotics.

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

Screenshot of a C++ tutorial from Vex Robotics, showcasing code examples and explanations related to V5 programming concepts.

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

Screenshot of a C++ programming tutorial from VEX Robotics, displaying code examples and explanations on the screen, highlighting key concepts for learning C++ in the context of VEX V5 robotics.

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: