Gamepad
Last updated
Last updated
A series of blocks that allow you to read gamepad button presses, joystick positions, and trigger values to command your robot's movements and actions.
Here is a diagram laying out what each button is mapped to:
There are four main types of gamepad blocks:
Button blocks: These blocks represent the various buttons on the gamepad (A, B, X, Y, D-pad, bumpers, triggers, etc.). They return a boolean value (true or false) indicating whether the button is pressed or not.
Joystick blocks: These blocks provide the X and Y coordinates of the left and right joysticks. The values range from -1 to 1, representing the full range of motion of the joystick.
Trigger blocks: These blocks provide a value between 0 and 1, representing the trigger's position.
The status of the gamepad. There is only one block of this type. AtRest block returns true if all analog sticks and triggers are in their rest position.