Skip to content

Commit 39321c4

Browse files
authored
Merge pull request #22 from adafruit/stemma_i2c
Added commented out board.STEMMA_I2C with explanation
2 parents 17eda57 + 6e34334 commit 39321c4

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

examples/ina260_averaging.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import board
66
from adafruit_ina260 import INA260, AveragingCount
77

8-
i2c = 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
910
ina260 = INA260(i2c)
1011

1112
# Raise the averaging count to a larger number to smooth out the results

examples/ina260_latch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
if __name__ == "__main__":
1111
try:
12-
i2c = board.I2C()
12+
i2c = board.I2C() # uses board.SCL and board.SDA
13+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector
1314
ina260 = INA260(i2c)
1415
except RuntimeError as r_e:
1516
# catch exception on init, no INA260 chip found

examples/ina260_modes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import board
66
from adafruit_ina260 import INA260, Mode
77

8-
i2c = 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
910
ina260 = INA260(i2c)
1011

1112
# trigger a sample

examples/ina260_simpletest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import board
66
import adafruit_ina260
77

8-
i2c = 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
910
ina260 = adafruit_ina260.INA260(i2c)
1011
while True:
1112
print(

0 commit comments

Comments
 (0)