API Reference
adafruit_lps2x
Library for the ST LPS2X family of pressure sensors
Author(s): Bryan Siepert
Implementation Notes
Hardware:
Adafruit LPS25 Pressure SensorLPS25HB Breakout (Product ID: 4530)
Adafruit LPS22 Pressure Sensor LPS22HB Breakout (Product ID: 4633)
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards:
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- class adafruit_lps2x.Rate
Options for
data_rateRate
Description
Rate.LPS25_SHUTDOWNSetting
data_ratetoRate.LPS25_SHUTDOWNstops measurements from being takenRate.LPS25_RATE_1_HZ1 Hz
Rate.LPS25_RATE_7_HZ7 Hz
Rate.LPS25_RATE_12_5_HZ12.5 Hz
Rate.LPS25_RATE_25_HZ25 Hz
Rate.LPS22_SHUTDOWNSetting
data_ratetoRate.LPS22_SHUTDOWNstops measurements from being takenRate.LPS22_RATE_1_HZ1 Hz
Rate.LPS22_RATE_10_HZ10 Hz
Rate.LPS22_RATE_25_HZ25 Hz
Rate.LPS22_RATE_50_HZ50 Hz
Rate.LPS22_RATE_75_HZ75 Hz
- class adafruit_lps2x.LPS2X(i2c_bus: I2C, address: int = 93, chip_id: int = -1)
Base class ST LPS2x family of pressure sensors
- Parameters:
- property data_rate: int
The rate at which the sensor measures
pressureandtemperature.data_rateshould be set to one of the values ofadafruit_lps2x.Rate
- class adafruit_lps2x.LPS25(i2c_bus: I2C, address: int = 93)
Library for the ST LPS25 pressure sensors
- Parameters:
- initialize() None
Configure the sensor with the default settings. For use after calling
LPS2X.reset()
- class adafruit_lps2x.LPS22(i2c_bus: I2C, address: Literal[92, 93] = 93)
Library for the ST LPS22 pressure sensors
- Parameters:
i2c_bus (I2C) – The I2C bus the LPS22HB is connected to.
address – The I2C device address. Default is
0x5dbut will accept0x5cwhen theSDOpin is connected to Ground.
- initialize() None
Configure the sensor with the default settings. For use after calling
LPS2X.reset()