A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jfurcean/CircuitPython_WiiChuck below:

jfurcean/CircuitPython_WiiChuck: CircuitPython library to support some Wiimote extension controllers.

CircuitPython driver for Nintento WiiMote I2C Accessory Devices

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

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)

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

For information on building library documentation, please check out this guide.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4