72 SUB_SENSOR(gas_resistance)
93 void set_heater(uint16_t heater_temperature, uint16_t heater_duration);
97 void setup()
override;
98 void dump_config()
override;
99 void update()
override;
This class simplifies creating components that periodically check a state.
uint8_t calc_heater_duration_(uint16_t duration)
Calculate the heater duration value to send to the BME680 register.
void read_data_()
Read data from the BME680 and publish results.
uint8_t calc_heater_resistance_(uint16_t temperature)
Calculate the heater resistance value to send to the BME680 register.
float calc_humidity_(uint16_t raw_humidity)
Calculate the relative humidity in % using the provided raw ADC value.
BME680Oversampling pressure_oversampling_
bool setup_registers_()
Configure the sensor registers; false on an I2C failure.
BME680CalibrationData calibration_
BME680Oversampling temperature_oversampling_
uint16_t heater_temperature_
BME680Oversampling humidity_oversampling_
float calc_gas_resistance_(uint16_t raw_gas, uint8_t range)
Calculate the gas resistance in Ω using the provided raw ADC value.
uint16_t heater_duration_
uint32_t calc_meas_duration_()
Calculate how long the sensor will take until we can retrieve data.
float calc_temperature_(uint32_t raw_temperature)
Calculate the temperature in °C using the provided raw ADC value.
float calc_pressure_(uint32_t raw_pressure)
Calculate the pressure in hPa using the provided raw ADC value.
BME680IIRFilter iir_filter_
This Class provides the methods to read/write bytes from/to an i2c device.
BME680IIRFilter
Enum listing all IIR Filter options for the BME680.
BME680Oversampling
Enum listing all oversampling options for the BME680.
@ BME680_OVERSAMPLING_16X
@ BME680_OVERSAMPLING_NONE
Struct for storing calibration data for the BME680.
int8_t ambient_temperature