VEXcode IQ can access the data from an IQ Controller by referencing the buttons and joystick axes by their names.
Position and Names of Buttons and Joysticks
The image below shows the button and joystick names and locations. Buttons return values of:
- 1 - Pressed
- 0 - Not Pressed / Released
Each joystick axis returns a value between -100 to +100, and returns a value of zero when centered.
Note: The Controller pictured in the animation is a (1st generation) Controller. However, the values are the same for both IQ (1st and 2nd gen) Controllers.
Blocks that include Controller Buttons and Joysticks
When programming in VEXcode IQ, understanding the button and joystick names, as well as their position on the Controller, helps determine which block should be used.
Once the Controller is configured, Controller blocks will be visible in the Toolbox.
For more information on using the Controller, see articles in the Controller section of the STEM Library.