Using Playstation 4 Dualshock on Raspberry PI 3


Short recipe for using ds4drv on Raspberry PI 3 (tested on raspian jessie). See links below for details.

Install Python pip and joystick packages,
apt-get install joystick
apt-get install python3-pip python-pip
pip install ds4drv

Bluetooth -> Add Device
 DS4: Share + Playstation button (see howtogeek for image)

To use the trackpad as mouse:
sudo ds4drv --hidraw --trackpad-mouse

Output:
root@raspberrypi:/home/pi# ds4drv --hidraw --trackpad-mouse
[info][controller 1] Created devices /dev/input/js1 (joystick) /dev/input/event5 (evdev)
[info][controller 1] Connected to Bluetooth Controller (70:20:84:9A:B5:AF hidraw3)
[info][hidraw] Scanning for devices
[info][controller 1] Battery: 45%

Ds4drv usage:
usage: ds4drv [-h] [--version] [--config filename] [--hidraw] [--daemon]
              [--daemon-log file] [--daemon-pid file] [--next-controller]
              [--profiles profiles] [--battery-flash] [--bindings bindings]
              [--profile-toggle buttons)] [--dump-reports] [--emulate-xboxdrv]
              [--emulate-xpad] [--emulate-xpad-wireless]
              [--ignored-buttons button(s] [--mapping mapping]
              [--trackpad-mouse] [--led color]

Tools:
jstest /dev/input/js1
jstest-gtk /dev/input/js1 (graphical, use "sudo apt-get install jstest-gtk")



https://www.howtogeek.com/240152/how-to-use-a-playstation-4s-dualshock-4-controller-for-pc-gaming/

https://github.com/macunixs/dualshock4-pi

https://github.com/chrippa/ds4drv

https://wiki.gentoo.org/wiki/Sony_DualShock

Kommentit

Tämän blogin suosituimmat tekstit

Matrox G200eW 1920x1200 resolution on Ubuntu 16.04

Docker CUDA Runtime

VESC open source motor controller