80 oversamplingHumidity : 3;
94 uint8_t measuring : 1;
99 oversamplingPressure : 3;
101 oversamplingTemperature : 3;
166 bool init()
override;
247 void setConfiguration();
253 void loadCompensationParameters();
257 int32_t computeFineTemperature(int32_t adcTemperature);
259 int32_t compensateTemperature(int32_t fineTemperature);
261 uint32_t compensatePressure(int32_t adcPressure);
263 uint32_t compensateHumidity(int32_t adcHumidity);
272 enum BME280Registers : uint8_t
285 REG_CTRL_MEAS = 0x74,
288 REG_PRESS_MSB = 0x77,
289 REG_PRESS_LSB = 0x78,
290 REG_PRESS_XLSB = 0x79,
293 REG_TEMP_XLSB = 0x7C,
300 BME280Comp compParams;
301 int32_t fineTemperature;
static const BME280Config BME280_CONFIG_TEMP_SINGLE
void setHumidityOversampling(Oversampling oversampling)
Sets the oversampling for humidity readings, use SKIPPED to disable humidity sampling.
@ OVERSAMPLING_1
Oversampling x1.
@ OVERSAMPLING_8
Oversampling x8.
@ OVERSAMPLING_4
Oversampling x4.
@ OVERSAMPLING_16
Oversampling x16.
@ OVERSAMPLING_2
Oversampling x2.
@ SKIPPED
Skipped (output set to 0x8000)
static const BME280Config BME280_CONFIG_ALL_ENABLED
Temperature enabled in forced mode.
void setTemperatureOversampling(Oversampling oversampling)
Sets the oversampling for temperature readings, use SKIPPED to disable temperature sampling.
bool init() override
Initialize the device with the specified configuration.
void setStandbyTime(StandbyTime standbyTime)
Sets the standby time between readings in normal mode.
void setSensorMode(Mode mode)
Sets the sensor mode.
@ FILTER_COEFF_8
Filter coefficient = 8.
@ FILTER_COEFF_2
Filter coefficient = 2.
@ FILTER_COEFF_16
Filter coefficient = 16.
@ FILTER_COEFF_4
Filter coefficient = 4.
static const BME280Config BME280_DEFAULT_CONFIG
Datasheet values for indoor navigation.
@ NORMAL_MODE
Normal mode.
@ FORCED_MODE
Forced mode.
unsigned int getMaxMeasurementTime()
bool selfTest() override
Reads the WHO AM I register.
static unsigned int calculateMaxMeasurementTime(BME280Config config)
Maximum measurement time formula from datasheet page 51.
HumidityData readHumidity()
Reads only the humidity, does not set the configuration.
PressureData readPressure()
Reads only the pressure, does not set the configuration.
void setPressureOversampling(Oversampling oversampling)
Sets the oversampling for pressure readings, use SKIPPED to disable pressure sampling.
void setFilterCoeff(FilterCoeff filterCoeff)
Sets the coefficient for the IIR filter (applied to temperature and pressure)
TemperatureData readTemperature()
Reads only the temperature, does not set the configuration.
BME280Data sampleImpl() override
Read a data sample from the sensor. In case of errors, the method should return the last available co...
static constexpr uint8_t REG_ID_VAL
Who am I value.
static PrintLogger getLogger(const string &name)
Base sensor class with has to be extended by any sensor driver.
Driver for the VN100S IMU.
Structure to handle humidity data.
Contains information about a single SPI slave device.
struct __attribute__((packed))
uint8_t status
Device status.
uint8_t ctrlHumidity
Humidity options.
struct __attribute__((packed)) BME280ConfigBits
struct Boardcore::BME280::BME280Config::@2 bytes
uint8_t config
Rate, filter and interface options.
uint8_t ctrlPressureAndTemperature