96 void set_heater(uint16_t heater_temperature, uint16_t heater_duration);
100 void setup()
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.
sensor::Sensor * humidity_sensor_
void set_pressure_sensor(sensor::Sensor *pressure_sensor)
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_
BME680CalibrationData calibration_
void set_pressure_oversampling(BME680Oversampling pressure_oversampling)
Set the pressure oversampling value. Defaults to 16X.
BME680Oversampling temperature_oversampling_
void set_humidity_sensor(sensor::Sensor *humidity_sensor)
float get_setup_priority() const override
uint16_t heater_temperature_
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
BME680Oversampling humidity_oversampling_
void set_temperature_oversampling(BME680Oversampling temperature_oversampling)
Set the temperature oversampling value. Defaults to 16X.
void dump_config() override
sensor::Sensor * temperature_sensor_
float calc_gas_resistance_(uint16_t raw_gas, uint8_t range)
Calculate the gas resistance in Ω using the provided raw ADC value.
void set_heater(uint16_t heater_temperature, uint16_t heater_duration)
Set how the internal heater should operate.
uint16_t heater_duration_
void set_gas_resistance_sensor(sensor::Sensor *gas_resistance_sensor)
sensor::Sensor * pressure_sensor_
void set_iir_filter(BME680IIRFilter iir_filter)
Set the IIR Filter value. Defaults to no IIR Filter.
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.
void set_humidity_oversampling(BME680Oversampling humidity_oversampling)
Set the humidity oversampling value. Defaults to 16X.
float calc_pressure_(uint32_t raw_pressure)
Calculate the pressure in hPa using the provided raw ADC value.
sensor::Sensor * gas_resistance_sensor_
BME680IIRFilter iir_filter_
This Class provides the methods to read/write bytes from/to an i2c device.
Base-class for all sensors.
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
Providing packet encoding functions for exchanging data with a remote host.
Struct for storing calibration data for the BME680.
int8_t ambient_temperature