Controller#
Introduction#
The VEX AIM One Stick Controller has four buttons and a joystick. The joystick can be moved along two axes and can also be pressed like a button.
Controller blocks can be used to check button presses, read joystick movement, or run blocks when controller events happen.
Below is a list of all blocks:
Values — Check controller button status or read joystick position.
controller button pressed? — Returns whether a selected controller button is being pressed.
controller axis position — Returns the joystick position along a selected axis.
Actions — Run blocks when controller input changes.
when controller button — Runs the attached stack when a selected button is pressed or released.
when controller axis is changed — Runs the attached stack when a joystick’s position changes along the selected axis.
Values#
controller axis position#
The controller axis position reporter block returns the joystick position along a selected axis as a number from -100 to 100.

(controller axis [1 v] position)
Parameter |
Description |
|---|---|
axis |
The joystick axis to report: 1 (up and down) or 2 (left and right). |
Example
when started
[Move forward when the joystick is moved up.]
forever
if <(controller axis [1 v] position) [math_greater_than v] [0]> then
move [forward v]
else
stop all movement
end
end
Actions#
when controller axis is changed#
The when controller axis is changed Hat block runs the attached stack when a joystick’s position changes along the selected axis.

when controller axis [1 v] is changed
Parameter |
Description |
|---|---|
axis |
The joystick axis to check: 1 (up and down) or 2 (left and right). |
Example
when controller axis [1 v] is changed
[Move forward when the joystick's position changes along axis 1.]
move [forward v] for [50] [mm v] ▶
