This is driver code for the BMP388 temp/pres sensor.
More...
#include <bmp388_barometer.h>
|
| BMP388Baro (TwoWire *wireInput=&SENSOR_I2C) |
| This is driver code for the BMP388 temp/pres sensor. More...
|
|
bool | Initialize (uint8_t presOS=BMP3_NO_OVERSAMPLING, uint8_t tempOS=BMP3_NO_OVERSAMPLING, uint8_t iirCoef=BMP3_IIR_FILTER_COEFF_3, uint8_t odr=BMP3_ODR_50_HZ) |
| Use Adafruit's BMP388 library to configure the BMP388. More...
|
|
bool | ReadSensor () |
| Use Adafruit's BMP388 library to read temperature and pressure registers. More...
|
|
float | GetPressure () |
| Return atmospheric pressure in [Pa]. More...
|
|
float | GetTemperature () |
| Return atmospheric temperature in [C]. More...
|
|
This is driver code for the BMP388 temp/pres sensor.
It also incorporates Adafruit's BMP388 driver code.
◆ BMP388Baro()
BMP388Baro::BMP388Baro |
( |
TwoWire * |
wireInput = &SENSOR_I2C | ) |
|
This is driver code for the BMP388 temp/pres sensor.
It also incorporates Adafruit's BMP388 driver code. Create BMP388 pressure and temperature sensor object.
- Parameters
-
wireInput | Wire/I2C interface that the sensor is connected to. |
◆ GetPressure()
float BMP388Baro::GetPressure |
( |
| ) |
|
Return atmospheric pressure in [Pa].
- Returns
- Pressure in [Pa]
◆ GetTemperature()
float BMP388Baro::GetTemperature |
( |
| ) |
|
Return atmospheric temperature in [C].
- Returns
- Temperature in [C]
◆ Initialize()
bool BMP388Baro::Initialize |
( |
uint8_t |
presOS = BMP3_NO_OVERSAMPLING , |
|
|
uint8_t |
tempOS = BMP3_NO_OVERSAMPLING , |
|
|
uint8_t |
iirCoef = BMP3_IIR_FILTER_COEFF_3 , |
|
|
uint8_t |
odr = BMP3_ODR_50_HZ |
|
) |
| |
Use Adafruit's BMP388 library to configure the BMP388.
Take a few readings to 'flush out' bad data. The input config. param. definitions can be found in lib/Adafruit_BMP3XX/Adafruit_BMP3XX.h
- Parameters
-
presOS | Pressure oversampling factor. |
tempOS | Temperature oversampling factor. |
iirCoef | IIR filter coef. for smoothing out data. |
odr | Output data rate. |
- Returns
- True if good reading, false if error.
◆ ReadSensor()
bool BMP388Baro::ReadSensor |
( |
| ) |
|
Use Adafruit's BMP388 library to read temperature and pressure registers.
- Returns
- True if good reading, false if error.
◆ _p
◆ _SensorWire
TwoWire* BMP388Baro::_SensorWire |
|
private |
◆ _t
◆ connected
bool BMP388Baro::connected |
|
private |
◆ prevMeasMicros
uint32_t BMP388Baro::prevMeasMicros |
The documentation for this class was generated from the following files: