Using VEXcode EXP C++ Example Projects and Templates

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


Using C++ Example Projects

VEXcode EXP 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 Accurate Turns example project highlighted.

To open any example, select one from the menu.

VEXcode EXP with the Accurate Turns example project opened, including configured devices, a description of the project, and the project's C++ code.

Commands for the example base 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 EXP Toolbar with the Build icon highlighted in between the Brain and Run icons.

Save (Windows, macOS, Chromebook) and build 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 EXP 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.

Templates have a special icon and are used to create a blank project with a preset device configuration.

VEXcode EXP with the Clawbot Drivetrain 2 motor template example project opened to provide a foundation for a new project using the Clawbot.

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

New C++ project opened in VEXcode EXP. The Description comment is highlighted, by default it reads EXP project.

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

VEXcode EXP with the Accurate Turns 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 EXP 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: