User Manual
CircuitPython on Python 2.x, it isn't supported!
CircuitPython & Python Usage
To demonstrate the usage of the sensor we'll initialize it and read the temperature and pressure levels from the
board's Python REPL.
Run the following code to import the necessary modules and initialize the I2C connection with the sensor:
import time
import board
import busio
import adafruit_lps35hw
i2c = busio.I2C(board.SCL, board.SDA)
lps35hw = adafruit_lps35hw.LPS35HW(i2c)
Now you're ready to read values from the sensor using these properties:
pressure - The barometric pressure in hPa.
temperature - The temperature in degrees C.
For example to print the pressure and temperature values:
print("Pressure: %.2f hPa" % lps35hw.pressure)
print("Temperature: %.2f C"% lps35hw.temperature)
For more details, check out the library documentation (https://adafru.it/ES0).
That's all there is to using the LPS33HW/LPS35HW sensor with CircuitPython!
Full Example Code
Temporarily unable to load content:
© Adafruit Industries https://learn.adafruit.com/lps35hw-water-resistant-pressure-sensor Page 23 of 28