From 540193927301ca5d5bce190af8337e6aa08c7b90 Mon Sep 17 00:00:00 2001 From: dherrada Date: Fri, 18 Nov 2022 13:05:24 -0500 Subject: [PATCH] Added commented out board.STEMMA_I2C with explanation --- examples/ina260_averaging.py | 3 ++- examples/ina260_latch.py | 3 ++- examples/ina260_modes.py | 3 ++- examples/ina260_simpletest.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/ina260_averaging.py b/examples/ina260_averaging.py index 73d9ee2..71f01f1 100644 --- a/examples/ina260_averaging.py +++ b/examples/ina260_averaging.py @@ -5,7 +5,8 @@ import board from adafruit_ina260 import INA260, AveragingCount -i2c = board.I2C() +i2c = board.I2C() # uses board.SCL and board.SDA +# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller ina260 = INA260(i2c) # Raise the averaging count to a larger number to smooth out the results diff --git a/examples/ina260_latch.py b/examples/ina260_latch.py index 85da4df..bab21e0 100644 --- a/examples/ina260_latch.py +++ b/examples/ina260_latch.py @@ -9,7 +9,8 @@ if __name__ == "__main__": try: - i2c = board.I2C() + i2c = board.I2C() # uses board.SCL and board.SDA + # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector ina260 = INA260(i2c) except RuntimeError as r_e: # catch exception on init, no INA260 chip found diff --git a/examples/ina260_modes.py b/examples/ina260_modes.py index af349bd..18bd53d 100644 --- a/examples/ina260_modes.py +++ b/examples/ina260_modes.py @@ -5,7 +5,8 @@ import board from adafruit_ina260 import INA260, Mode -i2c = board.I2C() +i2c = board.I2C() # uses board.SCL and board.SDA +# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller ina260 = INA260(i2c) # trigger a sample diff --git a/examples/ina260_simpletest.py b/examples/ina260_simpletest.py index 1cb07d9..43fdeae 100644 --- a/examples/ina260_simpletest.py +++ b/examples/ina260_simpletest.py @@ -5,7 +5,8 @@ import board import adafruit_ina260 -i2c = board.I2C() +i2c = board.I2C() # uses board.SCL and board.SDA +# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller ina260 = adafruit_ina260.INA260(i2c) while True: print(