Expand description
The BMP390 is a digital sensor with pressure and temperature measurement based on proven sensing principles. The sensor is more accurate than its predecessor BMP380, covering a wider measurement range. It offers new interrupt functionality, lower power consumption, and a new FIFO functionality. The integrated 512 byte FIFO buffer supports low power applications and prevents data loss in non-real-time systems.
Bmp390 is a driver for the BMP390 sensor. It provides methods to read the temperature and pressure from the
sensor over I2C. It is built on top of the embedded_hal_async::i2c
traits to be compatible with a wide range of embedded platforms.
§Example
use bmp390::Bmp390;
let config = bmp390::Configuration::default();
let mut sensor = Bmp390::try_new(i2c, bmp390::Address::Up, delay, &config).await?;
let pressure = sensor.pressure().await?;
println!("Pressure: {:.2} hPa", pressure);§Datasheet
The BMP390 Datasheet contains detailed information about the sensor’s features, electrical characteristics, and registers. This package implements the functionality described in the datasheet and references the relevant sections in the documentation.
Structs§
- BMP390 barometer driver.
Register::CMDissues commands to the BMP390.Register::CONFIGcontrols the IIR filter coefficients.- Configuration for the BMP390 barometer.
Register::ERR_REGcontains sensor error conditions.Register::EVENTcontains status flags for certain events. These flags are cleared on read.Register::INT_CTRLconfigures the interrupt settings and affectsRegister::INT_STATUSand theINTpin.Register::INT_STATUSshows interrupt statuses and is cleared on read.- A single measurement from the BMP390 barometer.
Register::ODRsets the configuration of the output data rates by means of setting the subdivision/subsampling.Register::OSRcontrols the oversampling settings for pressure and temperature measurements.Register::PWR_CTRLenables or disables pressure and temperature measurements and sets thePowerMode.Register::STATUScontains sensor status flags.
Enums§
- The BMP390 barometer’s I2C addresses, either
0x76or0x77. - Errors that can occur when communicating with the BMP390 barometer.
- Available commands that can be written to
Register::CMD. - The IIR filter can suppress short-term pressure disturbances by filtering internally.
- The interrupt level for the
INTpin. - The interrupt output type for the
INTpin. - The output data rate (ODR) is the rate at which the sensor provides new data.
- Oversampling settings for pressure and temperature measurements.
- The BMP390 offers three power modes: sleep mode, forced mode and normal mode.
- The BMP390 has a number of registers to provide access to the sensor’s data and control various settings.