File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 77import adafruit_nunchuk
88
99m = 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
1214centerX = 120
1315centerY = 110
Original file line number Diff line number Diff line change 77import adafruit_nunchuk
88
99m = 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
1214centerX = 128
1315centerY = 128
Original file line number Diff line number Diff line change 55import board
66import adafruit_nunchuk
77
8- nc = adafruit_nunchuk .Nunchuk (board .I2C ())
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
10+ nc = adafruit_nunchuk .Nunchuk (i2c )
911
1012while True :
1113 x , y = nc .joystick
You can’t perform that action at this time.
0 commit comments