File tree Expand file tree Collapse file tree 5 files changed +10
-5
lines changed Expand file tree Collapse file tree 5 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 5
5
import board
6
6
from adafruit_lps35hw import LPS35HW , DataRate
7
7
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
9
10
lps = LPS35HW (i2c )
10
11
11
12
lps .data_rate = DataRate .ONE_SHOT
Original file line number Diff line number Diff line change 6
6
import adafruit_lps35hw
7
7
8
8
9
- i2c = board .I2C ()
9
+ i2c = board .I2C () # uses board.SCL and board.SDA
10
+ # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
10
11
lps = adafruit_lps35hw .LPS35HW (i2c )
11
12
12
13
lps .low_pass_enabled = True
Original file line number Diff line number Diff line change 5
5
import board
6
6
import adafruit_lps35hw
7
7
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
9
10
lps = adafruit_lps35hw .LPS35HW (i2c )
10
11
11
12
# You may need to adjust the threshold to something closer
Original file line number Diff line number Diff line change 5
5
import board
6
6
import adafruit_lps35hw
7
7
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
9
10
lps = adafruit_lps35hw .LPS35HW (i2c )
10
11
11
12
# set the current pressure as zero hPa and make measurements
Original file line number Diff line number Diff line change 5
5
import board
6
6
import adafruit_lps35hw
7
7
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
9
10
lps = adafruit_lps35hw .LPS35HW (i2c )
10
11
11
12
while True :
You can’t perform that action at this time.
0 commit comments