Skip to content

Commit f8a4c02

Browse files
committed
Added commented out board.STEMMA_I2C with explanation
1 parent 1be6d8e commit f8a4c02

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

examples/nunchuk_accel_mouse.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
import adafruit_nunchuk
88

99
m = Mouse(usb_hid.devices)
10-
nc = adafruit_nunchuk.Nunchuk(board.I2C())
10+
i2c = board.I2C() # uses board.SCL and board.SDA
11+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
12+
nc = adafruit_nunchuk.Nunchuk(i2c)
1113

1214
centerX = 120
1315
centerY = 110

examples/nunchuk_analog_mouse.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
import adafruit_nunchuk
88

99
m = Mouse(usb_hid.devices)
10-
nc = adafruit_nunchuk.Nunchuk(board.I2C())
10+
i2c = board.I2C() # uses board.SCL and board.SDA
11+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
12+
nc = adafruit_nunchuk.Nunchuk(i2c)
1113

1214
centerX = 128
1315
centerY = 128

examples/nunchuk_simpletest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import board
66
import adafruit_nunchuk
77

8+
i2c = board.I2C() # uses board.SCL and board.SDA
9+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
810
nc = adafruit_nunchuk.Nunchuk(board.I2C())
911

1012
while True:

0 commit comments

Comments
 (0)