Skip to main content

use your DualSense (PS5) controller with python

Project description

pydualsense

control your dualsense through python. using the hid library this module implements the sending report for controlling you new PS5 controller. It creates a background thread to constantly receive and update the controller.

install

Just 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.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

pydualsense-0.4.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydualsense-0.4.1.tar.gz
  • Upload date:
  • Size: 7.1 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.1.tar.gz
Algorithm Hash digest
SHA256 cf9dc7e071e2fc202f1171f6c8d7c04a061ff1f025e655f7b866cb5ed04e6d02
MD5 e88152e02f8a509a7106e93f04b48dec
BLAKE2b-256 9aa258bc06b18c604c805e69149480a6578fd8b51c5178a38af16244431d5001

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pydualsense-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8fc07d9678a3c6a28e7a93db004bdc648e8cac5b7f13c45e0fbb7449683ca6b
MD5 995e740c3f19b9e418f6bf468783e24a
BLAKE2b-256 71930258c7beed75470894b5a02552bc59f9e904d77e39702eb81aca1a3bcbfe

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