adafruit_nunchuk

CircuitPython library for Nintendo Nunchuk controller

  • Author(s): Carter Nelson

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_nunchuk.Nunchuk(i2c, address=82, i2c_read_delay=0.002)

Class which provides interface to Nintendo Nunchuk controller.

Parameters:
  • 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.
acceleration

The current accelerometer reading.

buttons

The current pressed state of button Z.

joystick

The current joystick position.

values

The current state of all values.