Configuring a Controller in VEXcode IQ

When starting to program with VEXcode IQ, Controller blocks will not appear in the Toolbox until a Controller has been configured.

This article will cover the following:

Note: If you have a Controller configured, you must have a Controller paired with your VEX IQ Brain for your project to run.


Adding a Controller

select_device_icon.configurecontroller.png

To configure a Controller, select the Devices icon to open the Devices window.

select_add_a_device.clawbot_example.png

Select “Add a device.”

VEXcode_IQ_-_dev_HfPEEHChrL.png

Select "Controller."

VEXcode_IQ_-_dev_nTHQUbZ2J4.png

If you want to program the Controller using VEXcode IQ, select “Done” to complete the configuration.

  • If you want to configure the Controller for use without coding, see the additional options below.

controllerblocks_added.png

Once the Controller is added, you will see the Controller added to the Devices Window, and Controller blocks (like those highlighted in this image) will appear in the Toolbox.


Assigning the Drivetrain to the Controller’s Joysticks

Now that the Controller has been added to the robot configuration, you can assign the Drivetrain to the Controller’s joysticks in the Devices window. This allows you to assign the Drivetrain to the Controller’s joysticks without having to add additional code.

  • The following example uses the Clawbot (Drivetrain 2-Motor)- (2nd gen) Example project.

select_device_icon.configurecontroller.png

Select the Devices icon to open the Devices window.

select_controller.assign_motors.png

Select "Controller."

select_joystick_to_toggle_through.png

Select a joystick icon to toggle through the options.

  • Selecting a joystick icon multiple times will cycle through all the options.
  • Stop once the desired drive mode is displayed.

The four drive modes that you can choose from are: Left Arcade, Right Arcade, Split Arcade, Tank.

 

VEXcode_IQ_-_dev_699sLae7vE.png

Left Arcade

All movement is controlled by the left joystick.

VEXcode_IQ_-_dev_PYfqZxK9QR.png

Right Arcade

All movement is controlled by the right joystick.

VEXcode_IQ_-_dev_gKmFQET6y9.png

Split Arcade

Forward and backward movement is controlled by the left joystick while turning is controlled by the right joystick.

VEXcode_IQ_-_dev_2S6TPHmR8u.png

Tank

The left motor is controlled by the left joystick while the right motor is controlled by the right joystick.

 

select_done_once_joysticks_are_assigned.png

Select “Done” to save your configuration.


Assigning the Motors to the Controller’s Buttons

Once the Controller has been added to the robot configuration, you can assign Motors to specific Controller buttons in the Devices window.  Assigning Motors in the Devices window allows you to control individual motors or motor groups without needing to add code. 

  • The following example has two Motors configured: ClawMotor and ArmMotor.

select_device_icon.configurecontroller.png

Select the Devices icon to open the Devices window.


select_controller.assign_motors.png

Select "Controller."

VEXcode_IQ_-_dev_QB0B9OJ7cb.png

Configure a motor to a button by selecting the buttons on the Controller.

  • Selecting the same button multiple times will cycle through your configured motors.
  • Stop once the desired motor is displayed.

The controller has four button groups (L, R, E, and F). Each group can have a single motor (that is not a part of the Drivetrain) configured to them.

Note: Once a motor has been configured, it will not display as an option for the other buttons.

select_done_when_motors_are_assigned.png

Select “Done” to save your configuration.


Deleting a Controller

VEXcode_IQ_-_dev_tmOKvfLKwB.png

A Controller can be deleted by selecting the “Delete” option at the bottom of the screen.