Skip to main content

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.

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)

Source distribution for eightbitdo-zero2 0.1.3
File Size Uploaded
eightbitdo_zero2-0.1.3.tar.gz 3.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for eightbitdo-zero2 0.1.3
File Interpreter ABI Platform
eightbitdo_zero2-0.1.3-py3.8.egg Legacy Egg format - - Details
eightbitdo_zero2-0.1.3-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.3 This release

3 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page