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

Starting and downloading C++ projects in VEXcode EXP is easy.


How to Start a C++ Project

Screen_Shot_2022-02-09_at_11.21.09_AM.png

Launch VEXcode EXP

Screen_Shot_2022-02-09_at_11.22.45_AM.png

The platform defaults to the Blocks interface.

Screen_Shot_2022-02-09_at_1.26.50_PM.png

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

Screen_Shot_2022-04-21_at_12.11.21_PM.png

Select C++ from the Project Language window.

Screen_Shot_2022-04-18_at_12.05.48_PM.png

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 Toolbox. The project outlined here will drive the EXP Clawbot forward for 200 millimeters (mm).

Screen_Shot_2022-04-18_at_12.58.41_PM.png

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

Screen_Shot_2022-04-18_at_2.06.38_PM.png

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

Screen_Shot_2022-04-18_at_2.37.10_PM.png

Notice that a set of project comments open in the workspace. You will add commands after the comments.

Screen_Shot_2022-04-18_at_2.39.15_PM.png

Select enter at the end of the last line of code (line 71). This should create the next numbered line (line 72). This is where you will start adding code to the project.

Screen_Shot_2022-04-18_at_2.40.20_PM.png

Now you can add commands from the Toolbox. Select the Drive for command.

Screen_Shot_2022-04-18_at_2.41.56_PM.png

Drag the Drive for command into the workspace and place it on the last line of the project (line 72).


How to Download and Run a C++ Project

Screen_Shot_2022-04-18_at_2.45.14_PM.png

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

Screen_Shot_2022-04-18_at_2.45.56_PM.png

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

Screen_Shot_2022-04-18_at_2.49.23_PM.png

Next, connect the Brain to your device (Directly via USB-C) and check that the Brain icon is green.

Screen_Shot_2022-04-18_at_2.49.23_PM_copy.png

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

Screen_Shot_2022-04-18_at_2.49.23_PM_copy_2.png

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

Drive_Forward.png

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

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