Run ds4drv in background on startup once booted. If it goes green after a few seconds, pairing is successful. Press and hold Share button, then press and hold PS button until the light bar starts blinking. led 00ff00 changes the light bar color, it's optional. If that's the case try the command without it. Some controllers don't work with -hidraw. Probably granting permission step doesn't take effect until rebooting. If you see Failed to create input device: "/dev/uinput" cannot be opened for writing, reboot and retry. Sudo wget -O /etc/udev/rules.d/lesĭs4drv -hidraw -led 00ff00.
InstallĬonnect your bluetooth controller to the raspberry pi. It's been much more stable, and convenient, to setup Bluetooth for a wireless, responsive control.
These can be used plugged in with a USB cable - but the default code and os driver has a bug polling this configuration.
Other controllers may work, but will require alternative Bluetooth installs, and tweaks to the software for correct The default code has been written and tested with Practice, the behavior will change depending on the model of joystick ( Sony, or knockoff ), or XBox controllerĪnd the Bluetooth driver used to support it. In theory, any joystick device that the OS mounts like this can be used. The default web controller may be replaced with a one line change to use a physical joystick part for input. The code for this part was copied from Tawn Kramer's fork of donkeycar.