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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydualsense-0.5.1.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.1.tar.gz
Algorithm Hash digest
SHA256 bff40d5ab42715e9319892bd1af03db5c6e600eae3b5142fd6fdafb7e8d90155
MD5 e79201f60693e5c0bea5857c8d98d6d8
BLAKE2b-256 373fddc88d48b8840631711f25e1bffdb7e7c05e52759d55d385639166c55cc8

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pydualsense-0.5.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 75a9dd00e56f9bd44c0748a05f9bd954a54f19f854f0eb354cb6ac288c82b9f4
MD5 88ab4c9d4fd40d1c32a4e4ad5d5c4ec3
BLAKE2b-256 be34e74f36c52ac3d5d77347bdf143df6f39821e28f9b835f127e9b3bfe48cf6

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