Adafruit LPS2X Barometric Pressure Sensor Library
Classes | Macros | Enumerations
Adafruit_LPS2X.h File Reference
#include "Arduino.h"
#include <Adafruit_BusIO_Register.h>
#include <Adafruit_I2CDevice.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>

Go to the source code of this file.

Classes

class  Adafruit_LPS2X_Temp
 
class  Adafruit_LPS2X_Pressure
 
class  Adafruit_LPS2X
 Class that stores state and functions for interacting with the LPS2X I2C Barometric Pressure & Temperature Sensor. More...
 
class  Adafruit_LPS25
 
class  Adafruit_LPS22
 

Macros

#define LPS2X_I2CADDR_DEFAULT   0x5D
 LPS2X default i2c address.
 
#define LPS2X_WHOAMI   0x0F
 Chip ID register.
 
#define LPS22HB_CHIP_ID   0xB1
 LPS22 default device id from WHOAMI.
 
#define LPS22_THS_P_L_REG   0x0C
 Pressure threshold value for int.
 
#define LPS22_CTRL_REG1   0x10
 First control register. Includes BD & ODR.
 
#define LPS22_CTRL_REG2   0x11
 Second control register. Includes SW Reset.
 
#define LPS22_CTRL_REG3   0x12
 Third control register. Includes interrupt polarity.
 
#define LPS25HB_CHIP_ID   0xBD
 LPS25HB default device id from WHOAMI.
 
#define LPS25_CTRL_REG1   0x20
 First control register. Includes BD & ODR.
 
#define LPS25_CTRL_REG2   0x21
 Second control register. Includes SW Reset.
 
#define LPS25_CTRL_REG3   0x22
 Third control register. Includes interrupt polarity.
 
#define LPS25_CTRL_REG4   0x23
 Fourth control register. Includes DRDY INT control.
 
#define LPS25_INTERRUPT_CFG   0x24
 Interrupt control register.
 
#define LPS25_THS_P_L_REG   0xB0
 Pressure threshold value for int.
 
#define LPS2X_PRESS_OUT_XL   (0x28 | 0x80)
 | 0x80 to set auto increment on multi-byte read
 
#define LPS2X_TEMP_OUT_L   (0x2B | 0x80)
 | 0x80 to set auto increment on
 

Enumerations

enum  lps25_rate_t {
  LPS25_RATE_ONE_SHOT, LPS25_RATE_1_HZ, LPS25_RATE_7_HZ, LPS25_RATE_12_5_HZ,
  LPS25_RATE_25_HZ
}
 Allowed values for setDataRate.
 
enum  lps22_rate_t {
  LPS22_RATE_ONE_SHOT, LPS22_RATE_1_HZ, LPS22_RATE_10_HZ, LPS22_RATE_25_HZ,
  LPS22_RATE_50_HZ, LPS22_RATE_75_HZ
}
 Allowed values for setDataRate.
 

Detailed Description

I2C Driver for the Library for the LPS2X family of barometric pressure sensors

This is a library for the Adafruit LPS2X breakout:
https://www.adafruit.com/products/4530

Adafruit invests time and resources providing this open source code,

please support Adafruit and open-source hardware by purchasing products from Adafruit!

BSD license (see license.txt)