Skip to main content

use your DualSense (PS5) controller with python

Project description

pydualsense

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

install

Download hidapi and place the x64 .dll file into your Workspace. 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.2.6

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydualsense-0.5.5.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

pydualsense-0.5.5-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file pydualsense-0.5.5.tar.gz.

File metadata

  • Download URL: pydualsense-0.5.5.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for pydualsense-0.5.5.tar.gz
Algorithm Hash digest
SHA256 bc401bdc755d2e5fc7e8a98d99c98a31356cdb8672efa55d6e0d6d4cb353defe
MD5 f5a13aaa7deff90ec7e67cf161cc158e
BLAKE2b-256 ea1e06586a84d24befed0d99f1f1a4822ae986e92b0ccc3e6fdf27952e96fe79

See more details on using hashes here.

Provenance

File details

Details for the file pydualsense-0.5.5-py3-none-any.whl.

File metadata

  • Download URL: pydualsense-0.5.5-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for pydualsense-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e43632737f66ed648271079b34b209aea564d5c8a8ab6ed57435e0097f312c4b
MD5 a19628015de3307460b06710ab063570
BLAKE2b-256 ccbbaff7b2b17ab744daaf89a451372e11076d86e0f839ee5ca3dc09cdcf403e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page