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 representing resources and tutorials for the VEX IQ Robotics platform, designed for educational purposes and beginner robotics enthusiasts, including C++ programming tutorials.

Launch VEXcode IQ.

Screenshot of C++ tutorial interface for VEX IQ Robotics platform, showcasing programming examples and resources for educators and students to enhance their robotics skills.

The platform defaults to the Blocks interface.

Screenshot of a C++ tutorial interface for VEX IQ Robotics, showcasing code snippets and programming concepts aimed at beginners in robotics education.

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

Screenshot of a C++ tutorial interface for VEX IQ, showcasing code examples and programming concepts, aimed at educators and students learning robotics.

Select C++ from the Project Language window.

Flowchart illustrating the process of programming with C++ in the VEX IQ Robotics platform, highlighting key steps and components for beginners and educators in robotics education.

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

Screenshot of the VEX IQ platform interface showing the 'Select File' option, used in C++ tutorials for programming VEX IQ robots, highlighting the process of choosing files for coding projects.

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

Screenshot of C++ tutorial interface for VEX IQ Robotics platform, displaying code examples and programming concepts for educational purposes.

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

Screenshot of a C++ tutorial interface for VEX IQ Robotics, displaying code examples and comments to assist users in programming their robots effectively.

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

Screenshot of a coding interface for VEX IQ, illustrating the steps to start adding code in C++ for robotics programming, with highlighted sections for user guidance.

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.

Screenshot of the VEXcode IQ interface showing the 'Add Commands' section, illustrating how to integrate commands into a robotics program for VEX IQ projects in C++ tutorials.

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

Screenshot of the Drag Command interface in VEXcode IQ, illustrating how to use drag-and-drop programming for VEX IQ robotics projects, part of the C++ tutorials section in the knowledge base.

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

Screenshot of a C++ tutorial interface for VEX IQ Robotics, displaying code examples and explanations to assist educators and students in programming VEX IQ robots effectively.

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:

Screenshot of the VEXcode IQ interface showing the 'Select Slot' option, used in C++ tutorials for programming VEX IQ robots, highlighting the educational resources available for beginners in robotics.

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

Diagram illustrating the color coding of brain components in the VEX IQ Robotics platform, used in C++ tutorials to enhance understanding of programming and robot assembly for educational purposes.

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

Downloadable resources for C++ tutorials in the VEX IQ Robotics knowledge base, designed to support educational purposes and beginner robotics enthusiasts.

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

Flowchart illustrating the process of running a C++ program in VEXcode IQ, highlighting key steps and components for programming VEX IQ robots.

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

Illustration depicting a robot driving forward, used in the context of C++ tutorials for the VEX IQ Robotics platform, highlighting educational resources for building and programming robots.Screenshot of C++ tutorial interface for VEX IQ Robotics, showcasing programming examples and resources for beginners in robotics education.

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: