Skip to content

Commit a547f6a

Browse files
authored
Merge pull request #38 from adafruit/stemma_i2c
Added commented out board.STEMMA_I2C with explanation
2 parents f3a5c65 + fcaea82 commit a547f6a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/vl53l0x_multiple_sensors.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
from 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
2021
xshut = [

examples/vl53l0x_multiple_sensors_continuous.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
from 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
3334
xshut = [
@@ -71,7 +72,7 @@
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()

0 commit comments

Comments
 (0)