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

Uploaded Source

Built Distribution

pydualsense-0.5.2.5-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydualsense-0.5.2.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pydualsense-0.5.2.5.tar.gz
Algorithm Hash digest
SHA256 795bf6cbf66acc72086bc9f4f2b704eae0fb39060f656a321896f43be4f1feb0
MD5 d23dca34f79b1a19c0a7e8904fbca5d6
BLAKE2b-256 28434e45ac23532c6e7ab6953d588a2751682017489911c9ce3d6ad11e31bd12

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pydualsense-0.5.2.5-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pydualsense-0.5.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 90f8b3334dd39842373134b34a5f1ef9a3547f7fb725f9bdcb28c1d3a18f5885
MD5 47dd0fe32c3b00178cd1c53d965db3e5
BLAKE2b-256 033a50a9da86ffa099955dad607ea729b62673f41913703c1be66e2a746c4ac7

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