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 7
7
import adafruit_nunchuk
8
8
9
9
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 )
11
13
12
14
centerX = 120
13
15
centerY = 110
Original file line number Diff line number Diff line change 7
7
import adafruit_nunchuk
8
8
9
9
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 )
11
13
12
14
centerX = 128
13
15
centerY = 128
Original file line number Diff line number Diff line change 5
5
import board
6
6
import adafruit_nunchuk
7
7
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 )
9
11
10
12
while True :
11
13
x , y = nc .joystick
You can’t perform that action at this time.
0 commit comments