Skip to content

jfurcean/CircuitPython_WiiChuck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

19aa79d · Jul 31, 2023

History

41 Commits
Jul 29, 2023
Feb 3, 2021
Jul 29, 2023
Jul 31, 2023
Jul 30, 2023
Jul 29, 2023
Jul 29, 2023
Jul 29, 2023
Feb 3, 2021
Jul 29, 2023
Feb 3, 2021
Feb 3, 2021
Feb 3, 2021
Jul 29, 2023
Jul 29, 2023
Feb 3, 2021
Feb 6, 2021

Repository files navigation

Introduction

Documentation Status Discord Build Status Code Style: Black

CircuitPython driver for Nintento WiiMote I2C Accessory Devices

Dependencies

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.

Usage Example

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.