Using C++ Example Projects and Templates in VEXcode V5

Example projects and Templates are a great resource if you are just getting started with VEXcode V5 and want to explore different robot behaviors. Example projects and Templates also allow you to observe how different commands in VEXcode V5 are used.


Using C++ Example Projects

VEXcode V5 Toolbar with the File menu open and the New Text Project option highlighted. New Text Project is the second option in the menu, below New Blocks Project.

To use a C++ Example project start by opening a New Text Project from the File menu.

VEXcode V5 Select a Project Language prompt that has options for Python or C++. Either language can be selected to open a new project, or below there is a Cancel button that will close the menu. The C++ project option is highlighted.

Select C++.

VEXcode V5 Toolbar with the File menu open and the Open Examples option highlighted. Open Examples is the fifth option in the menu, below New Blocks Project, New Text Project, Open, and Open Recent.

To open an Example Project, select the File menu and choose Open Examples.

VEXcode Example Projects menu with a variety of projects across different categories to choose from.

Icons for many different Example Projects will be shown. Each icon represents a different project and is colored according to the command categories.

VEXcode Example Projects menu with the Filter bar highlighted. The Filter bar has many categories of example projects.

The Filter bar can be used to quickly find a specific type of example.

VEXcode Example Projects menu with the Changing Velocities example project highlighted.

To open any example, select one from the menu.

VEXcode V5 with an Example Project opened, including code comments with a description of the project above and the actual C++ code below.

Commands for the example project will populate in the workspace. These commands and their parameters can be changed or removed. Additional commands can be added to modify the example project.

VEXcode V5 Toolbar with the Download icon highlighted in between the Brain and Run icons.

Save and download the example to try it on your robot.


Using Templates

VEXcode Example Projects menu with the Templates category in the Filter bar highlighted.

There is also a special type of example called a Template.

VEXcode Example Projects menu with the Clawbot (Drivetrain 2-motor, No Gyro) template project highlighted.

Select the template for your robot. For example, the Clawbot (Drivetrain 2-motor, No Gyro) template.

VEXcode V5 with a template example project opened, including configured devices and code comments with a description of the project. The Devices menu is opened to the side to demonstrate that the devices are pre configured to certain ports.

The Template is used to create a blank project with the preset device configuration for your robot.

VEXcode V5 with the Clawbot (Drivetrain 2-motor, No Gyro) template project opened in the Workspace. The user has added some code to the project to control the Drivetrain.

If using a standard robot build, like the Clawbot, a Template can be used to quickly get started with a new project.


Descriptions in C++ Example Projects and Templates

VEXcode V5 with the Clawbot (Drivetrain 2-motor, Inertial) template project opened and with its Description and Configuration comment fields highlighted.

Each C++ Example Project and Template contains a description in the workspace. Descriptions can be used to document certain information in a project.

VEXcode V5 with the Left Arcade Control example project opened and with its Description and Configuration comment fields highlighted.

In a C++ Example Project, the description provides a short summary for what the project does and also lists the device configuration.

VEXcode V5 with a template example project opened and with its Configuration comment field highlighted. This template uses multiple devices, and each device is listed on a new line.

In a Template, the description notes which devices are listed in the configuration.

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

Last Updated: