Configuring a Controller#

Configuring a Controller

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

  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 Controller.

Screenshot of the Select a device screen, with Controller highlighted.
  1. The Controller’s buttons and joysticks are shown, labeled by name. If you have a Drivetrain and/or Motor configured, you can assign controls for them here. These configured actions only run during a project while the controller enable/disable block has them enabled.

  2. Select a button to choose which pair of buttons will control that device — one button for the forward direction, and the other for reverse.

Screenshot of the Select buttons to set actions screen, showing the E up and down buttons set to control Motor4's forward and reverse directions.
  1. If you have a Drivetrain configured, selecting a joystick toggles through different control schemes:

  • Left Arcade — The left joystick controls both the Drivetrain’s forward and reverse movement and its turning.

Screenshot of the Select buttons to set actions screen, showing the left joystick set to control the Drivetrain's movement and turning together.
  • Right Arcade — The right joystick controls both the Drivetrain’s forward and reverse movement and its turning.

Screenshot of the Select buttons to set actions screen, showing the right joystick set to control the Drivetrain's movement and turning together.
  • Split Arcade — One joystick controls the Drivetrain’s forward and reverse movement, while the other joystick controls turning.

Screenshot of the Select buttons to set actions screen, showing the left joystick set to control forward and reverse movement, and the right joystick set to control turning.
  • Tank Drive — The left joystick controls the left side of the Drivetrain, and the right joystick controls the right side, independently.

Screenshot of the Select buttons to set actions screen, showing the left and right joysticks each set to control their own side of the Drivetrain.
  1. Select Done to add the Controller to your robot.

Screenshot of the Select buttons to set actions screen, with the Done button highlighted.
  1. The Controller 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 Controller in the list of devices.
  1. The Controller category will now appear in the toolbox, containing its blocks.

Screenshot of the toolbox with the Controller category open, showing the controller button pressed?, controller axis position, and Controller Disable blocks.