Getting Started Cameras & Video Detection & Recording Automation & Events Actions Integration & Connectivity Network & Discovery AI & Remote Control MQTT Modbus Pi4J & Raspberry Pi GPIO ZeroMQ System & Administration Comparisons Use Cases Troubleshooting About & Legal
Home / Documentation / Pi4J Gamepad 2D Vector Action
Action ยท Pi4J 2.0.0

Pi4J Gamepad 2D Vector

Maps two gamepad axes to two PWM GPIO outputs with dead-zone, range, direction, and zero-origin controls.

ParameterDescription
Pi4J Thing / gamepadTarget GPIO controller and input gamepad ID.
Stop thresholdAxis dead zone from -1 through 1.
X / Y axis indexGamepad axes; -1 disables an axis.
X / Y min;mid;maxSemicolon-separated pulse widths.
X / Y BCMTarget configured PWM pins.
Reverse / Y from zeroDirection and throttle-origin controls.
Test safely: verify neutral pulse widths and controller axis indexes before attaching motors or steering hardware.
PTZ

Pan and tilt

Map two axes to two GPIO PWM servo outputs.

RC

Steering and throttle

Use reversal, dead zone, and zero-origin mode to match vehicle controls.