PlayStation 4 Controller Support¶
Nothing more to do for this controller, it pairs over Pairing Controllers over Bluetooth with no issues. On modern kernels this now does support motion events as well as the touchpad, treating the touchpad as a pair of axes reading the last location of a single touch. See the last part of Standard Names for details on how to access these properties.
DualShock4(dead_zone=0.05, hot_zone=0.05, **kwargs)¶
Driver for the Sony PlayStation 4 controller, the DualShock4
__init__(dead_zone=0.05, hot_zone=0.05, **kwargs)¶
Create a new DualShock4 driver
list of (vendor_id, product_id) for this controller
set_leds(hue: float = 0.0, saturation: float = 1.0, value: float = 1.0)¶
The DualShock4 has an LED bar on the front of the controller. This function allows you to set the value of this bar. Note that the controller must be connected for this to work, if it’s not the call will just be ignored.
hue – The hue of the colour, defaults to 0, specified as a floating point value between 0.0 and 1.0.
saturation – Saturation of the colour, defaults to 1.0, specified as a floating point value between 0.0 and 1.0.
value – Value of the colour (i.e. how bright the light is overall), defaults to 1.0, specified as a floating point value between 0.0 and 1.0