Skip to content

Commit 21d9ce6

Browse files
authored
Merge pull request #28 from adafruit/stemma_i2c
Added commented out board.STEMMA_I2C with explanation
2 parents 50a9d14 + b4c1907 commit 21d9ce6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

examples/rockblock_feather_sense_sensors.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@
1616
uart.baudrate = 19200
1717
rb = adafruit_rockblock.RockBlock(uart)
1818

19+
i2c = board.I2C() # uses board.SCL and board.SDA
20+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
21+
1922
# all the sensors
20-
accelo = adafruit_lsm6ds.LSM6DS33(board.I2C())
21-
magno = adafruit_lis3mdl.LIS3MDL(board.I2C())
22-
prox = adafruit_apds9960.apds9960.APDS9960(board.I2C())
23-
sht = adafruit_sht31d.SHT31D(board.I2C())
24-
bmp = adafruit_bmp280.Adafruit_BMP280_I2C(board.I2C())
23+
accelo = adafruit_lsm6ds.LSM6DS33(i2c)
24+
magno = adafruit_lis3mdl.LIS3MDL(i2c)
25+
prox = adafruit_apds9960.apds9960.APDS9960(i2c)
26+
sht = adafruit_sht31d.SHT31D(i2c)
27+
bmp = adafruit_bmp280.Adafruit_BMP280_I2C(i2c)
2528

2629
# build data
2730
# can decode on other end with struct.unpack("<6fB5f", data)

0 commit comments

Comments
 (0)