Configuring a 2-Motor Drivetrain in VEXcode V5

When beginning a new project in VEXcode V5, commands to control the Drivetrain of your robot will not appear in the Toolbox until a Drivetrain has been configured.

You can only configure one Drivetrain per project. 

If you are configuring a Drivetrain without a Gyro Sensor, view this article


Adding a Drivetrain

VEXcode V5 Toolbar with the Devices icon highlighted in between the Code Viewer and the Print Console icons.

To configure a Drivetrain, select the Devices button to open the Devices window.

VEXcode V5 Devices menu with the Add a device button shown.

Select Add a device.

VEXcode V5 Devices menu after the Add a device button has been selected. The Drivetrain 2 motor option is highlighted.

Select Drivetrain 2-Motor.

VEXcode V5 Devices menu showing the Smart Port options for the Left Motor. In this example, the Smart Port numbered 1 is highlighted.

Select which port the Left Motor is connected to on the V5 Brain.

VEXcode V5 Devices menu showing the Smart Port options for the Right Motor. In this example, the Smart Port numbered 10 is highlighted.

Select which port the Right Motor is connected to on the V5 Brain.

Note that ports that are already configured for other devices will be unavailable.

Select device option

Inertial Sensor

VEXcode V5 Devices menu showing the additional device options for the Drivetrain that read Inertial Sensor, GPS Sensor, 3-Wire Gyro, and No Gyro. The Inertial Sensor option is highlighted.

To use the Inertial Sensor, select Inertial Sensor.

VEXcode V5 Devices menu showing the Smart Port options for the Inertial Sensor. In this example, the Smart Port numbered 20 is highlighted.

Select the port the Inertial Sensor is connected to on the V5 Brain.

Note that ports that are already configured for other devices will be unavailable.

VEXcode V5 Devices menu with the Drivetrain Settings screen shown. Below, the Done button is highlighted.

Be sure that the Wheel Size, Gear Ratio, and Gear Cartridge match your robot.

Select Done to save the configuration. 

GPS Sensor

VEXcode V5 Devices menu showing the additional device options for the Drivetrain that read Inertial Sensor, GPS Sensor, 3-Wire Gyro, and No Gyro. The GPS Sensor option is highlighted.

To use the GPS Sensor, select GPS Sensor.

VEXcode V5 Devices menu showing the Smart Port options for the GPS Sensor. In this example, the Smart Port numbered 20 is highlighted.

Select the port the GPS Sensor is connected to on the V5 Brain.

Note that ports that are already configured for other devices will be unavailable.

VEXcode V5 Devices window with the Drivetrain Settings menu shown after the GPS Sensor has been selected. The X Offset, Y Offset, and Angle Offset options are highlighted. There is a diagram of the GPS Sensor on an example robot to the right to help visualize these values.

You can set X, Y, and Angle Offsets to match the position of the GPS Sensor on your robot.

To learn more about offsets, and configuring the GPS Sensor, view this article.

VEXcode V5 Devices menu with the Drivetrain Settings screen shown. Below, the Done button is highlighted.

Be sure that the Wheel Size, Gear Ratio, and Gear Cartridge match your robot.

Select Done to save the configuration. 

3-Wire Gyro

VEXcode V5 Devices menu showing the additional device options for the Drivetrain that read Inertial Sensor, GPS Sensor, 3-Wire Gyro, and No Gyro. The 3-Wire Gyro option is highlighted.

To use the 3-Wire Gyro, select 3-Wire Gyro.

VEXcode V5 Devices menu showing the 3-Wire Port options for the 3-Wire Gyro Sensor. In this example, the 3-Wire Port labeled A is highlighted.

Select the 3-Wire port that the Gyro is connected to on the V5 Brain.

Note that the 3-Wire Gyro uses a 3-Wire port, not a Smart Port.

VEXcode V5 Devices menu with the Drivetrain Settings screen shown. Below, the Done button is highlighted.

Be sure that the Wheel Size, Gear Ratio, and Gear Cartridge match your robot.

Select Done to save the configuration. 


Changing a Drivetrain’s Port Numbers

VEXcode V5 Devices window with the Drivetrain Settings menu shown. Above, the icons for the Left Motor, Right Motor, and Gyro Smart Ports are highlighted.

You can change the port number for the Left Motor, Right Motor or Gyro in the Drivetrain by selecting the device’s plug icon in the top right corner.

Select a different port on the Port Selection screen and the port number will turn green. Then select Done to save the updated configuration. 


Changing a Drivetrain’s Wheel Size

VEXcode V5 Devices window with the Drivetrain Settings menu shown. The Wheel Size dropdown menu is highlighted and opened, with options reading 2.75 inches, 3.25 inches, 4 inches, 5 inches, and 6 inches.

You can change the wheel size for the Drivetrain by selecting the dropdown menu under Wheel Size. Choose your desired wheel size, then select Done to save the updated configuration. 

Note: The default values are for the V5 Clawbot and Speedbot. If you are using the Clawbot or Speedbot, you do not need to change the values.


Changing a Drivetrain’s Gear Ratio

VEXcode V5 Devices window with the Drivetrain Settings menu shown. The Gear Ratio options are highlighted. There is an input field and an output field, and a symbol indicating that the numbers represent a ratio.

You can change the gear ratio for the Drivetrain by entering values in the Input and Output boxes. Then select Done to save the updated configuration. 

Note: The default values are for the VEX V5 Clawbot and Speedbot. If you are using the Clawbot or Speedbot, you do not need to change the values.


Changing a Gear Cartridge

VEXcode V5 Devices window with the Drivetrain Settings menu shown. The Gear Cartridge options are highlighted, with options that read 36:1 100 rpm, 18:1 200 rpm, and 6:1 600 rpm.

The settings also allow the gear cartridge to be changed. 

Select the cartridge that matches your robot. Then select Done to save the updated configuration. 


Reversing a Drivetrain

VEXcode V5 Devices window with the Drivetrain Settings menu shown. The directional arrows have been highlighted to indicate that the Drivetrain's direction can be changed.

The settings also allow the direction of the Drivetrain to be reversed. 

Select the arrows around the robot icon to change the direction of the Drivetrain. Then select Done to save the updated configuration. 


Deleting a Drivetrain

VEXcode V5 Devices window with the Drivetrain Settings menu shown. Below, the Delete button is highlighted.

A Drivetrain can be deleted by selecting Delete.

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

Last Updated: