Joystick — X/Y axis [-100..100] (get_joy_axis_ble)¶
What it does: Returns the current X or Y axis value for the selected joystick (physical or virtual).

Inputs¶
- Field
joy_name: joystick selection (joystick 1/2 or Bluetooth virtual left/right). - Field
axis: choice of axisXorY.
Output¶
- Number: axis position in the range of approximately
-100%to100%.
When to use it¶
- For motion control, menu or speed/direction control.
- After initializing the physical joystick via
joystick_initor when virtual data is available.
Tips and pitfalls¶
- The virtual joystick is truncated in the code to the range
-100..100.
Usage example¶

Generated Python example¶
value = joystick1.get_joyX()