User Manual
Remember for non-express boards like the, you'll need to manually install the necessary libraries from the bundle:
adafruit_lps35hw.mpy
adafruit_bus_device
adafruit_register
You can also download the adafruit_lps35hw.mpy from its releases page on Github (https://adafru.it/ER-).
Before continuing make sure your board's lib folder or root filesystem has
the adafruit_lps35hw.mpy, adafruit_bus_device, and adafruit_register files and folders copied over.
Next connect to the board's serial REPL (https://adafru.it/Awz) so you are at the CircuitPython >>> prompt.
Python Installation of LPS35HW Library
You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also
require enabling I2C on your platform and verifying you are running Python 3. Since each platform is a little different,
and Linux changes often, please visit the CircuitPython on Linux guide to get your computer
ready (https://adafru.it/BSN)!
Once that's done, from your command line run the following command:
sudo pip3 install adafruit-circuitpython-lps35hw
If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use
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:
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.
import time
import board
import busio
import adafruit_lps35hw
i2c = busio.I2C(board.SCL, board.SDA)
lps35hw = adafruit_lps35hw.LPS35HW(i2c)
© Adafruit Industries https://learn.adafruit.com/lps35hw-water-resistant-pressure-sensor Page 13 of 18










