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:
- https://www.reddit.com/r/gamedev/comments/jumvi5/dualsense_haptics_leds_and_more_hid_output_report/
- https://github.com/Ryochan7/DS4Windows
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
Release history Release notifications | RSS feed
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.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file pydualsense-0.5.2.tar.gz
.
File metadata
- Download URL: pydualsense-0.5.2.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ead24b38ed3de55b0eb820ff9aa5042fc63ca8454640da14f79a111271df23c5 |
|
MD5 | 6da4ed3fd4bd10e221d22a9575e9ea1e |
|
BLAKE2b-256 | d77e9bf3f65ec292cdba8cd22b71f563cbb40e5c2d4ad398be1b91a972aa8426 |
Provenance
File details
Details for the file pydualsense-0.5.2-py3-none-any.whl
.
File metadata
- Download URL: pydualsense-0.5.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf04a2cb2ceaaa5fb9badcf2404956d7c1f7b7e6395750ec7138492bba84aa4e |
|
MD5 | e2c23a8399bcf1214060e7b42d52b685 |
|
BLAKE2b-256 | dacf3d29a76423b8d720e8e59222350f4bee62c3c89d258b7dcc5102c3d64dd2 |