File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1414from adafruit_vl53l0x import VL53L0X
1515
1616# declare the singleton variable for the default I2C bus
17- i2c = board .I2C ()
17+ i2c = board .I2C () # uses board.SCL and board.SDA
18+ # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
1819
1920# declare the digital output pins connected to the "SHDN" pin on each VL53L0X sensor
2021xshut = [
Original file line number Diff line number Diff line change 2727from adafruit_vl53l0x import VL53L0X
2828
2929# declare the singleton variable for the default I2C bus
30- i2c = board .I2C ()
30+ i2c = board .I2C () # uses board.SCL and board.SDA
31+ # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
3132
3233# declare the digital output pins connected to the "SHDN" pin on each VL53L0X sensor
3334xshut = [
7172# In the python REPR, you can scan for all I2C devices that are attached and detirmine
7273# their addresses using:
7374# >>> import board
74- # >>> i2c = board.I2C()
75+ # >>> i2c = board.I2C() # uses board.SCL and board.SDA
7576# >>> if i2c.try_lock():
7677# >>> [hex(x) for x in i2c.scan()]
7778# >>> i2c.unlock()
You can’t perform that action at this time.
0 commit comments