Configuring a Controller#

Configuring a Controller

This tutorial walks you through configuring a Controller in VEXcode V5. By the end, you’ll have added a Controller and assigned it actions.

  1. Select the Devices tab.

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.

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.

Screenshot of the Select buttons to set actions screen, showing the Controller's buttons and joysticks with no actions assigned yet.
  1. Select a button to choose which pair of buttons will control a motor — one button for the forward direction, and the other for reverse. If multiple motors are configured, both pairs of buttons can be selected at once.

Screenshot of the Select buttons to set actions screen, showing the up and down D-pad 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. See Configuring a Drivetrain if you haven’t added one yet.

  • 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 — The left joystick’s up and down controls the Drivetrain’s forward and reverse movement, while the right joystick’s left and right controls turning.

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

Screenshot of the Select buttons to set actions screen, showing the left and right joysticks' up and down 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.

Screenshot of the Devices tab, showing Controller1 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 Controller1 pressed?, position, play rumble, and Controller Disable blocks.