Start, Download, and Run a VEXcode V5 C++ Project

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

The following article will cover:

  • How to Start a C++ Project
  • How to Build a Basic C++ Project
  • How to Download and Run a C++ Project

How to Start a C++ Project

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

2020-11-03_8-49-55.jpg

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

2020-11-03_8-53-33.jpg

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

2020-11-03_8-56-03.jpg

The C++ interface will open.

2020-11-03_10-26-56.jpg


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

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

2020-11-03_10-28-55a.jpg

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

Clawbot_template.png

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

2020-11-03_10-55-04.jpg

Select the [Drive for] command.

2020-11-03_11-18-02.jpg

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

2020-11-03_11-14-45a.jpg


How to Download and Run a C++ Project

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:

2020-11-03_11-35-01.jpg

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

2020-11-03_11-37-39.jpg

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

2020-11-03_11-35-01gb.jpg

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

2020-11-03_11-35-01dl.jpg

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

2020-11-03_11-35-01r.jpg

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

2020-11-03_11-44-14.jpg