Python driver for Nintendo Switch Joy-Con
Project description
Python driver for Nintendo Switch Joy-Con
install
pip install joycon-python
usage
Quick status check
cd joycon-python/
python pyjoycon/joycon.py
or Use as module
from pyjoycon import device
from pyjoycon.joycon import JoyCon
ids = device.get_ids("R")
joycon = JoyCon(*ids)
joycon.get_status()
status values
{
'battery': {
'charging': 0,
'level': 2
},
'buttons': {
'right': {
'y': 0,
'x': 0,
'b': 0,
'a': 0,
'sr': 0,
'sl': 0,
'r': 0,
'zr': 0
},
'shared': {
'minus': 0,
'plus': 0,
'r-stick': 0,
'l-stick': 0,
'home': 0,
'capture': 0,
'charging-grip': 0
},
'left': {
'down': 0,
'up': 0,
'right': 0,
'left': 0,
'sr': 0,
'sl': 0,
'l': 0,
'zl': 0
}
},
'analog-sticks': {
'left': {
'horizontal': 0,
'vertical': 0
},
'right': {
'horizontal': 2170,
'vertical': 1644
}
},
'accel': {
'x': 879,
'y': 1272,
'z': 549
},
'gyro': {
'x': -354,
'y': -7,
'z': 281
}
}
cython-hidapi to use Bluetooth / HID connection in Python.
environments
- macOS Mojave (10.14.6)
- Python (3.7.4)
- hidapi (0.7.99.post21)
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
joycon-python-0.1.1.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file joycon-python-0.1.1.tar.gz.
File metadata
- Download URL: joycon-python-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7a648bb102fc46337dc6ea8a3e9dd965a165ee12fdd7733c58a45cc52fd7fa9
|
|
| MD5 |
31435d788e934ac2218f285040e42bb6
|
|
| BLAKE2b-256 |
697fe3328118f84a75645a7d9862a44897b27e26be8558920fc0f32375f06c89
|
File details
Details for the file joycon_python-0.1.1-py3-none-any.whl.
File metadata
- Download URL: joycon_python-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c94b29ad425bd40adbb1a22ffab5da7d44e8fecc81e1108bd5b12f751d05255
|
|
| MD5 |
90a46de943b387269157d12055054fcd
|
|
| BLAKE2b-256 |
bbfd11aa09cc1a3b9379b277695b8d3925d796420af7174a8bb0a0b44ab019da
|