https://github.com/jfurcean/circuitpython_wiichuck
CircuitPython library to support some Wiimote extension controllers.
https://github.com/jfurcean/circuitpython_wiichuck
circuitpython wii
Last synced: about 1 month ago
JSON representation
CircuitPython library to support some Wiimote extension controllers.
- Host: GitHub
- URL: https://github.com/jfurcean/circuitpython_wiichuck
- Owner: jfurcean
- License: mit
- Created: 2021-02-03T20:31:12.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-31T12:43:22.000Z (over 2 years ago)
- Last Synced: 2025-02-09T06:12:53.403Z (10 months ago)
- Topics: circuitpython, wii
- Language: Python
- Homepage:
- Size: 78.1 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Introduction
============
.. image:: https://readthedocs.org/projects/circuitpython-wiichuck/badge/?version=latest
:target: https://circuitpython-wiichuck.readthedocs.io/
:alt: Documentation Status
.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/jfurcean/CircuitPython_WiiChuck/workflows/Build%20CI/badge.svg
:target: https://github.com/jfurcean/CircuitPython_WiiChuck/actions
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
CircuitPython driver for Nintento WiiMote I2C Accessory Devices
Dependencies
=============
This driver depends on:
* `Adafruit CircuitPython `_
* `Bus Device `_
Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle `_.
Usage Example
=============
.. code-block:: python
import time
import board
from wiichuck.nunchuk import Nunchuk
nc = Nunchuk(board.I2C())
while True:
x, y = nc.joystick
ax, ay, az = nc.acceleration
print("joystick = {},{}".format(x, y))
print("accceleration ax={}, ay={}, az={}".format(ax, ay, az))
buttons = nc.buttons
if buttons.C:
print("button C")
if buttons.Z:
print("button Z")
time.sleep(0.5)
Contributing
============
Contributions are welcome! Please read our `Code of Conduct
`_
before contributing to help this project stay welcoming.
Documentation
=============
For information on building library documentation, please check out `this guide `_.