8bitdo zero2
Python code to use the 8bitdo zero2 controller with a Raspberry Pi.
How to use
Installation
$ pip install eightbitdo-zero2
Usage example
from gpiozero import LED
from eightbitdo_zero2 import EightBitDoZero2
# led
red = LED(17)
blue = LED(10)
def main():
# Initialize controller
controller = EightBitDoZero2(
on_y=red.on,
off_y=red.off,
on_a=blue.on,
off_a=blue.off,
)
# Start listen
controller.listen()
if __name__ == "__main__":
main()
There are more example code in examples.
Options
Controller initialize options.
| name | type | default | detail |
|---|---|---|---|
| device_path | string | "/dev/input/js0" | File path to which device is connected. |
| debug | boolean | False | Debug mode setting. When True, The entered command is displayed on STDOUT. |
| on_<button_name> | function | lambda: None | Action when the button is pressed. |
| off_<button_name> | function | lambda: None | Action when the button is Released. |
License
This software is released under the MIT License, see LICENSE.
Metadata
Release files for eightbitdo-zero2 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eightbitdo_zero2-0.1.3.tar.gz | 3.9 kB | Without provenance | Details for eightbitdo_zero2-0.1.3.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eightbitdo_zero2-0.1.3-py3.8.egg | Legacy Egg format | - | - | Details for eightbitdo_zero2-0.1.3-py3.8.egg |
| eightbitdo_zero2-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for eightbitdo_zero2-0.1.3-py3-none-any.whl |
Total release size: 13.9 kB
Release files / eightbitdo_zero2-0.1.3.tar.gz
| Download URL | eightbitdo_zero2-0.1.3.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c17474735133741f22dc1024d745c6c685f97481f7b39d8a8ee38d6659da6a7
|
|
BLAKE2b-256 checksum How to use checksums |
5c336d2f49f3eb432c28725b867fc344465141989d7932759eab0dff5189e291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.12
|
Release files / eightbitdo_zero2-0.1.3-py3.8.egg
| Download URL | eightbitdo_zero2-0.1.3-py3.8.egg |
|---|---|
| Size | 5.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
eb0b2ef6ce11736eb1b59763dd7f0d5f3808b8f168bb390a989e51a680aac3be
|
|
BLAKE2b-256 checksum How to use checksums |
42a36cb5652314480137e70d5ff3c64e06f1c91d3fe4392b454a15536bc47852
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.12
|
Release files / eightbitdo_zero2-0.1.3-py3-none-any.whl
| Download URL | eightbitdo_zero2-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dc439d603ef317b134a43e01e997b31c76023f0d509438fd5780287241c39fe
|
|
BLAKE2b-256 checksum How to use checksums |
430ba7a66594c5c5359c1d5d9dba79490641bcce468db10e784667c321a00ffc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.12
|
Security for eightbitdo-zero2 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.