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

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

  • hid >= 1.0.4

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.4.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

pydualsense-0.4.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydualsense-0.4.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for pydualsense-0.4.2.tar.gz
Algorithm Hash digest
SHA256 86ca579a5178b9b488571a961e7247d30203fbba9be3578f37aed083069f051f
MD5 f793857938e1c07987ef2b664b6e0b53
BLAKE2b-256 f52da98e04df492c647972f6cf9655e6c7f34afd2d073467f07aa24ada9a11b0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pydualsense-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for pydualsense-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 71be8d46344cf395752c6ca31f612631a1d776e288382c8671e7169c45b2f182
MD5 5e60660dc61068a885d1f36acac53f04
BLAKE2b-256 8892e15c3f4bb9b47c84af12fbb5f9596c8cca60446e08fdb02d1e64067faec4

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