Configuring a Drivetrain#

Configuring a Drivetrain

This tutorial walks you through configuring a Drivetrain in VEXcode IQ (2nd gen). By the end, you’ll have added and configured a Drivetrain.

  1. Select the Devices tab. If the Devices tab is not visible, see Navigating VEXcode.

Screenshot of VEXcode's tab bar, with the Devices tab highlighted.
  1. Select Add a Device.

Screenshot of the Devices tab, with the Add a Device button highlighted.
  1. Select Drivetrain 2-Motor.

Screenshot of the Select a device screen, with Drivetrain 2-Motor highlighted.
  1. Select the port that the left motor is connected to.

Screenshot of the Left Motor port selection screen, showing ports 1 through 12 to choose from.
  1. Select the port that the right motor is connected to.

Screenshot of the Right Motor port selection screen, showing ports 1 through 12 to choose from.
  1. Select what sensor you want to use with your Drivetrain:

  • No Sensor — No Inertial or Gyro Sensor will be connected to your Drivetrain. Blocks that rely on these sensors will not appear in your toolbox.

  • Gyro — Select the port for an external Gyro Sensor to measure the drivetrain’s movements.

  • Brain Inertial — Use the Brain’s built-in Inertial Sensor to measure the drivetrain’s movements.

Screenshot of the Select device option screen, showing No Sensor, Gyro, and Brain Inertial options.
  1. Configure your Drivetrain’s Wheel Size (Circ.), Gear Ratio, and Direction settings. If you’re using a pre-made build, the default values do not need to be changed.

Screenshot of the Drivetrain Settings screen, showing Wheel Size, Gear Ratio, and Direction options.

If you selected No Sensor, two additional settings will also appear: Track Width and Wheel Base, the distance between the left/right and front/back wheels. These help the Drivetrain estimate its movement without a Gyro or Inertial Sensor.

Screenshot of the Drivetrain Settings screen for a Drivetrain with No Sensor, showing the additional Track Width and Wheel Base options.
  1. Select Done to add the Drivetrain to your robot.

Screenshot of the Drivetrain Settings screen, with the Done button highlighted.
  1. The Drivetrain will now appear in your list of devices, and its category and blocks will be added to your toolbox.

Screenshot of the Devices tab, showing Drivetrain in the list of devices with its left and right motor ports.
  1. The Drivetrain category will now appear in the toolbox, containing its blocks.

Screenshot of the toolbox with the Drivetrain category open, showing the drive and turn blocks.