adafruit_wii_classic
¶
CircuitPython library for Nintendo Wii Classic controllers.
Author(s): Liz Clark
Implementation Notes¶
Hardware:
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
- class adafruit_wii_classic.Wii_Classic(i2c: I2C, address: int = 0x52, i2c_read_delay: float = 0.002)¶
Class which provides interface to Nintendo Wii Classic controller.
- Parameters:
i2c (~I2C) – The
busio.I2C
object to use.address (int) – (Optional) The I2C address of the device. Default is 0x52.
i2c_read_delay (float) – (Optional) The time in seconds to pause between the I2C write and read. This needs to be at least 200us. A conservative default of 2000us is used since some hosts may not be able to achieve such timing.
- property buttons: Buttons¶
The current pressed state of buttons
- property d_pad: D_Pad¶
The current pressed state of d-pad buttons
- property joystick_l: Joystick_L¶
The current left joystick position.
- property joystick_r: Joystick_R¶
The current right joystick position.
- property l_shoulder: L_Shoulder_Analog¶
The current left shoulder button pressure.
- property r_shoulder: R_Shoulder_Analog¶
The current right shoulder button pressure.
- property values: Values¶
The current state of all values.