Skip to content

control your dualsense controller with python

License

Notifications You must be signed in to change notification settings

monolithicpower/pydualsense

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pydualsense

control your dualsense through python. using the hid library this package implements the report features for controlling your new PS5 controller.

Installation

Windows

Download hidapi and place the x64 .dll file into your Workspace. After that install the package from pypi.

pip install pydualsense

Linux

On Linux based system you first need to install the hidapi through your package manager of your system.

On an Ubuntu system the package libhidapi-dev is required.

sudo apt install libhidapi-dev

After that install the package from pypi.

pip install pydualsense

usage

from pydualsense import pydualsense, TriggerModes

ds = pydualsense() # open controller
ds.init() # initialize controller
ds.light.setColorI(255,0,0) # set touchpad color to red
ds.triggerL.setMode(TriggerModes.Rigid)
ds.triggerL.setForce(1, 255)
ds.close() # closing the controller

See examples folder for some more ideas

Help wanted

Help wanted from people that want to use this and have feature requests. Just open a issue with the correct label.

dependecies

  • hidapi-usb >= 0.3

Credits

Most stuff for this implementation were provided by and used from:

Coming soon

  • add bluetooth support
  • add multiple controllers
  • reading the states of the controller to enable a fully compatibility with python - partially done
  • add documentation using sphinx

About

control your dualsense controller with python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%