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

The right hand side of the VEXcode V5 Toolbar with the Devices icon highlighted in a red box. The Devices icon is between the Code Viewer and Print Console icons.

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

Devices Window in VEXcode V5 open with a large button that reads Add a Device.

Select Add a device.

The options for Devices to be added are shown, and the top reads Select a Device. The Drivetrain 2-motor option is in the center of the top row of options, between Controller and Drivetrain 4-Motor.

Select Drivetrain 2-Motor.

The port selection window reads Left Motor Select a Port at the top and shows options for ports 1-21 in three rows of 7 buttons with 1 in the upper left corner. Port 1 is highlighted with a red box.

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

The port selection window reads Right Motor Select a Port at the top and shows options for ports 1-21 in three rows of 7 buttons with 1 in the upper left corner. Port 10 is highlighted with a red box.

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

The Drivetrain configuration window reads Select device option at the top and shows icons for the Inertial Sensor, GPS Sensor, 3 Wire Gyro, and No Gyro options. The Inertial Sensor is highlighted with a red box.

To use the Inertial Sensor, select Inertial Sensor.

The port selection window reads Inertial Select a Port at the top and shows options for ports 1-21 in three rows of 7 buttons with 1 in the upper left corner. Port 20 is highlighted with a red box.

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.

The configuration window reads Drivetrain Settings at the top. The settings below read Wheel Size, with the 4 inches diameter selected; Gear Ratio, set to a 1:1 input to output ratio, and Gear Cartridge wit hthe 18 to 1 200rpm setting selected. On the right hand side a robot icon shows a blue arrow pointing upwards, indicated forward motion. In the bottom right hand corner is a button that reads Done, to the right of the Cancel option. The Done button is highlighted with a red box.

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

Select Done to save the configuration. 

GPS Sensor

The Drivetrain configuration window reads Select device option at the top and shows icons for the Inertial Sensor, GPS Sensor, 3 Wire Gyro, and No Gyro options. The GPS Sensor is highlighted with a red box.

To use the GPS Sensor, select GPS Sensor.

The port selection window reads GPS Select a Port at the top and shows options for ports 1-21 in three rows of 7 buttons with 1 in the upper left corner. Port 20 is highlighted with a red box.

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.

The configuration window reads Drivetrain Settings at the top. The GPS Sensor settings are highlighted at the top of the window. They read X Offset set to 0mm; Y Offset set to 0mm; and Angle Offset set to 180 degrees, with a robot icon to the right showing the approximate placement of the sensor. On the bottom of the window the settings read Wheel Size, with the 4 inches diameter selected; Gear Ratio, set to a 1:1 input to output ratio, and Gear Cartridge with the 18 to 1 200rpm setting selected.

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.

The same configuration window, with the Done button in the bottom right hand corner highlighted with a red box. The Done button is to the right of the Cancel button.

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

Select Done to save the configuration. 

3-Wire Gyro

The Drivetrain configuration window reads Select device option at the top and shows icons for the Inertial Sensor, GPS Sensor, 3 Wire Gyro, and No Gyro options. The 3-Wire Gyro is highlighted with a red box.

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

The port selection window reads Gryo Select a Port at the top and shows options for ports A through H in two rows of 4 triangular buttons with A in the upper left corner. Port A is highlighted with a red box.

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.

The configuration window reads Drivetrain Settings at the top. The settings below read Wheel Size, with the 4 inches diameter selected; Gear Ratio, set to a 1:1 input to output ratio, and Gear Cartridge wit hthe 18 to 1 200rpm setting selected. On the right hand side a robot icon shows a blue arrow pointing upwards, indicated forward motion. In the bottom right hand corner is a button that reads Done, to the right of the Cancel option. The Done button is highlighted with a red box.

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

The Drivetrain Settings window is shown with red boxes highlighted the set ports icons in the upper right hand side of the window. Below are settings for Wheel Size, Gear Ration and Gear Cartridge, as well as Drivetrain direction.

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

The Drivetrain Settings Window with the dropdown for Wheel Size open. The options read 2.75 inches, 3.25 inches, 4 inches, 5 inches, and 6 inches. 4 inches is selected with a checkmark. The rest of the window shows the Gear Ratio, Gear Cartridge and Drivetrain Direction settings.

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

The Drivetrain Settings window with the Gear Ratio highlighted. The current ratio reads Input 1 Output 1, and is highlighted in a red box to indicate what to select to update the Gear ration. Above are the Wheel Size Settings, and below are Gear Cartridge selections.

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

The Drivetrain Settings window with the Gear Cartridge options highlighted in a red box at the bottom of the window below the Wheel Size, Gear Ratio, and Drivetrain Direction. The Gear Cartride of 36 to 1 100rpm is selected.

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

The Drivetrain Settings window with a red box around the robot icon to the right of the Wheel Size and Gear Ratio settings. The arrow indicating the forward direction is gray, and the arrow indicating the reverse direction is blue, showing that the Drivetrain has been reversed.

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

The Drivetrain Settings window with the Delete button in the bottom left corner, to the left of the Cancel and Done buttons, highlighted in a red box indicating what to select to delete a drivetrain from a configuration.

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: