diff --git a/examples/nunchuk_accel_mouse.py b/examples/nunchuk_accel_mouse.py index c386590..bd85898 100644 --- a/examples/nunchuk_accel_mouse.py +++ b/examples/nunchuk_accel_mouse.py @@ -7,7 +7,9 @@ import adafruit_nunchuk m = Mouse(usb_hid.devices) -nc = adafruit_nunchuk.Nunchuk(board.I2C()) +i2c = board.I2C() # uses board.SCL and board.SDA +# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller +nc = adafruit_nunchuk.Nunchuk(i2c) centerX = 120 centerY = 110 diff --git a/examples/nunchuk_analog_mouse.py b/examples/nunchuk_analog_mouse.py index f26295c..0276f42 100644 --- a/examples/nunchuk_analog_mouse.py +++ b/examples/nunchuk_analog_mouse.py @@ -7,7 +7,9 @@ import adafruit_nunchuk m = Mouse(usb_hid.devices) -nc = adafruit_nunchuk.Nunchuk(board.I2C()) +i2c = board.I2C() # uses board.SCL and board.SDA +# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller +nc = adafruit_nunchuk.Nunchuk(i2c) centerX = 128 centerY = 128 diff --git a/examples/nunchuk_simpletest.py b/examples/nunchuk_simpletest.py index 7731e90..ec93d52 100644 --- a/examples/nunchuk_simpletest.py +++ b/examples/nunchuk_simpletest.py @@ -5,7 +5,9 @@ import board import adafruit_nunchuk -nc = adafruit_nunchuk.Nunchuk(board.I2C()) +i2c = board.I2C() # uses board.SCL and board.SDA +# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller +nc = adafruit_nunchuk.Nunchuk(i2c) while True: x, y = nc.joystick