From 390a91b407331ca9e529ef3ec5703ebed648468f Mon Sep 17 00:00:00 2001 From: dherrada Date: Fri, 18 Nov 2022 13:05:25 -0500 Subject: [PATCH] Added commented out board.STEMMA_I2C with explanation --- examples/lps35hw_data_rate.py | 3 ++- examples/lps35hw_filter.py | 3 ++- examples/lps35hw_high_threshold.py | 3 ++- examples/lps35hw_relative.py | 3 ++- examples/lps35hw_simpletest.py | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/lps35hw_data_rate.py b/examples/lps35hw_data_rate.py index c44950c..370eae5 100644 --- a/examples/lps35hw_data_rate.py +++ b/examples/lps35hw_data_rate.py @@ -5,7 +5,8 @@ import board from adafruit_lps35hw import LPS35HW, DataRate -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 lps = LPS35HW(i2c) lps.data_rate = DataRate.ONE_SHOT diff --git a/examples/lps35hw_filter.py b/examples/lps35hw_filter.py index a551341..032c995 100644 --- a/examples/lps35hw_filter.py +++ b/examples/lps35hw_filter.py @@ -6,7 +6,8 @@ import adafruit_lps35hw -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 lps = adafruit_lps35hw.LPS35HW(i2c) lps.low_pass_enabled = True diff --git a/examples/lps35hw_high_threshold.py b/examples/lps35hw_high_threshold.py index 9a3daa3..e461573 100644 --- a/examples/lps35hw_high_threshold.py +++ b/examples/lps35hw_high_threshold.py @@ -5,7 +5,8 @@ import board import adafruit_lps35hw -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 lps = adafruit_lps35hw.LPS35HW(i2c) # You may need to adjust the threshold to something closer diff --git a/examples/lps35hw_relative.py b/examples/lps35hw_relative.py index bdc4bc0..55beb79 100644 --- a/examples/lps35hw_relative.py +++ b/examples/lps35hw_relative.py @@ -5,7 +5,8 @@ import board import adafruit_lps35hw -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 lps = adafruit_lps35hw.LPS35HW(i2c) # set the current pressure as zero hPa and make measurements diff --git a/examples/lps35hw_simpletest.py b/examples/lps35hw_simpletest.py index d17b681..ae54a35 100644 --- a/examples/lps35hw_simpletest.py +++ b/examples/lps35hw_simpletest.py @@ -5,7 +5,8 @@ import board import adafruit_lps35hw -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 lps = adafruit_lps35hw.LPS35HW(i2c) while True: