Documentation
¶
Overview ¶
Command pad-hid is a development example (step 31.3) for the HID drivers of the gamepads: for each pad it shows the name, the kind, the battery, the touchpad fingers and the gyroscope and accelerometer, and it has buttons for the light bar, the motors and the motors of the triggers. A square turns with the gyroscope, so that the sensors can be seen working. It uses package internal/pads for the sensors and the touchpad, which 31.7 and 31.9 make public, so it is a development example.
Run it with a pad connected (PlayStation 4 or 5, Switch Pro, Xbox over Bluetooth); on Linux the user must be allowed to open /dev/hidraw* (docs/GUIDE.md has the udev rule), and GLUTTER_GAMEPAD_HID=0 reads the pads without the drivers:
go run ./examples/dev/pad-hid