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

  • 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.5.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

pydualsense-0.5.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydualsense-0.5.0.tar.gz
  • Upload date:
  • Size: 7.8 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.2 CPython/3.9.1

File hashes

Hashes for pydualsense-0.5.0.tar.gz
Algorithm Hash digest
SHA256 11ba8a6acb4580d62b4b506a4e516294ee33403da18c23d39555da8019e2c2cd
MD5 260bd80540a40e48d45e9badf39b9d64
BLAKE2b-256 b66bef3bd3b21cd47a50be5b3157c83163aceb190e65b966b30645e996421879

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pydualsense-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.2 CPython/3.9.1

File hashes

Hashes for pydualsense-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1574041cf276008f1c26ffe896a2f6662e9ce6ba4459690d548a37437620b246
MD5 397ad74d90f22d4feae846f6db6a84b4
BLAKE2b-256 a9b341bb983861d2ce280ba9653e66d1d3d9482777de489619dd9f88f9fafe42

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