Library for interfacing Bosch Sensortec BMP388 pressure sensor
The BMP388 is an absolute barometric pressure sensor especially designed for mobile applications. -) I2C interface with communication speed up to 3.4 MHz -) Two user selectable addresses (chosen by chip pin) -) Pressure range: 300 to 1100hPa -) Temperature range : -40 to 85°C
typical I2C clock speed to be used
Available BMP388 I2C addresses
Oversampling configuration for pressure measurement (BMP388_OSR_ADDR, Bit 0-2)
Oversampling configuration for temperature measurement (BMP388_OSR_ADDR, Bit 3-5)
Standby time configuration (BMP388_ODR_ADDR, Bit 0-4)
Available Power Control Modes (BMP388_PWR_CTRL_ADDR, Bit 0-1, 4-5)
Filter coefficient for IIR filter (BMP388_CONFIG_ADDR, Bit 1-3)
Initializes i2c communication with the BMP388 and prepares the BMP388 for use
First reads the chip ID and checks if a chip supported by the library has been found. Afterwards, the calibration parameters are read out and stored in the transferred, empty device handle for a BMP388.
Activates the BMP388 by setting the "osr" , "odr", "pwr_ctrl" and "config" register
Before activating, the BMP388 is set into sleep mode to establish a defined operating state
reads the measured values from the BMP388.
Sets the BMP388 into sleep mode (i.e. no measurements are performed) and thus grants minimum power consumption
absolute maximum I2C clock speed
BMP388 Register Addresses (Address | Default | Description)
Error Register values (BMP388_ERR_REG_ADDR, Bit 0-2)
Status Register values (BMP388_STATUS_ADDR, Bit 4-6)
Event Register values (BMP388_EVENT_ADDR, Bit 0)
Interrupt Status Register values (BMP388_INT_STATUS_ADDR, Bit 0-1, 3)
FIFO Config 1 Register options (BMP388_FIFO_CONFIG_1_ADDR, Bit 0-4)
FIFO Config 2 Register options (BMP388_FIFO_CONFIG_2_ADDR, Bit 0-4)
Interrupt Control Configuration Register options (BMP388_INT_CTRL_ADDR, Bit 0-4, 6)
Serial Interface Settings Register options (BMP388_IF_CONF_ADDR, Bit 0-2)
Available Commands for Command Register (BMP388_CMD_ADDR, Bit 0-7)
Resets the BMP388 using the complete power-on-reset procedure
Executes an I2C communication with the BMP388. Data is first of all sent and data is then received.