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

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


How to Start a C++ Project

VEXcode IQ Icon

Launch VEXcode IQ.

New Project

The platform defaults to the Blocks interface.

New Text Project

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

Screen_Shot_2022-04-21_at_11.40.33_AM.png

Select C++ from the Project Language window.

Cpp project

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 IQ Clawbot forward for 200 millimeters (mm).

Select File

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

Screen_Shot_2022-04-21_at_11.46.32_AM.png

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

Comments

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

Start Adding Code

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

Add Commands

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

Drag Command

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


How to Download and Run a C++ Project

Name Project

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

Select Slot

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

Brain Color

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

Download

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

Run

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

Drive_Forward.pnggZmim74LCX.png

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

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

Last Updated: