Using Examples and Templates#
This tutorial walks you through opening an example project and a pre-made template in VEXcode IQ (2nd gen). By the end, you’ll have an example project open, and know how to load a template for your robot build.
Example projects are a great resource to explore different robot behaviors or how different blocks in VEXcode are used. Templates are blank projects with devices already configured, so if you’re using a robot build from builds.vex.com, you won’t need to configure the devices yourself.
Select File in the top-left of VEXcode, then select Open Examples.
Opening the Examples page will open a new project, so be sure to save any unsaved work in your current project first. If your project hasn’t been saved yet, select Save to save it before continuing.
The Open Examples page shows all the available example projects.
Select one of the filters to narrow down the example projects shown, such as Drivetrain to only show example projects demonstrating how to code a Drivetrain.
You can also use the search bar to search for the name of an example project.
Select an example project, then select Save and Create Project to save the new project to your device.
The project will open in VEXcode with code demonstrating the example already in the workspace. The robot will already be configured in the Devices menu, and a note in the workspace will explain what the project does and what device configuration to use with it.
You can also use a template instead of an example project:
Go to the Devices tab, then select Select a build. If the Devices tab is not visible, see Navigating VEXcode.
Select the robot build you are using.
If your build has different versions, select which version you’re using.
VEXcode will show you all of the devices used with the build and what ports they’re connected to. Select Done to add this configuration to your project.
Those devices will now appear, configured in the Devices menu, ready to code with.