Skip to content

Commit db12447

Browse files
authored
Merge pull request #17 from adafruit/stemma_i2c
Added commented out board.STEMMA_I2C with explanation
2 parents ccb9fa5 + ade95aa commit db12447

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

examples/lis2mdl_calibrate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import adafruit_lis2mdl
99

1010
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
1112
magnetometer = adafruit_lis2mdl.LIS2MDL(i2c)
1213

1314
# calibration for magnetometer X (min, max), Y and Z

examples/lis2mdl_compass.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import adafruit_lis2mdl
1010

1111
i2c = board.I2C() # uses board.SCL and board.SDA
12+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
1213
sensor = adafruit_lis2mdl.LIS2MDL(i2c)
1314

1415
# You will need the calibration values from your magnetometer calibration

examples/lis2mdl_interrupt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import adafruit_lis2mdl
77

88
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
910
lis = adafruit_lis2mdl.LIS2MDL(i2c)
1011
lis.interrupt_threshold = 80
1112
lis.interrupt_enabled = True

examples/lis2mdl_simpletest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import adafruit_lis2mdl
99

1010
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
1112
sensor = adafruit_lis2mdl.LIS2MDL(i2c)
1213

1314
while True:

0 commit comments

Comments
 (0)