77 void setup()
override;
89 uint8_t
read_u8_(uint8_t a_register);
93 virtual bool read_byte(uint8_t a_register, uint8_t *data) = 0;
94 virtual bool write_byte(uint8_t a_register, uint8_t data) = 0;
95 virtual bool read_bytes(uint8_t a_register, uint8_t *data,
size_t len) = 0;
This class simplifies creating components that periodically check a state.
This class implements support for the BME280 Temperature+Pressure+Humidity sensor.
uint8_t read_u8_(uint8_t a_register)
void set_pressure_sensor(sensor::Sensor *pressure_sensor)
int16_t read_s16_le_(uint8_t a_register)
BME280IIRFilter iir_filter_
float read_humidity_(const uint8_t *data, int32_t t_fine)
Read the humidity value in % using the provided t_fine value.
virtual bool read_byte(uint8_t a_register, uint8_t *data)=0
void set_humidity_sensor(sensor::Sensor *humidity_sensor)
virtual bool read_byte_16(uint8_t a_register, uint16_t *data)=0
sensor::Sensor * pressure_sensor_
BME280CalibrationData calibration_
virtual bool write_byte(uint8_t a_register, uint8_t data)=0
void set_iir_filter(BME280IIRFilter iir_filter)
Set the IIR Filter used to increase accuracy, defaults to no IIR Filter.
void set_humidity_oversampling(BME280Oversampling humidity_over_sampling)
Set the oversampling value for the humidity sensor. Default is 16x.
BME280Oversampling temperature_oversampling_
void set_pressure_oversampling(BME280Oversampling pressure_over_sampling)
Set the oversampling value for the pressure sensor. Default is 16x.
BME280Oversampling humidity_oversampling_
float read_pressure_(const uint8_t *data, int32_t t_fine)
Read the pressure value in hPa using the provided t_fine value.
enum esphome::bme280_base::BME280Component::ErrorCode NONE
void set_temperature_oversampling(BME280Oversampling temperature_over_sampling)
Set the oversampling value for the temperature sensor. Default is 16x.
sensor::Sensor * humidity_sensor_
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
float get_setup_priority() const override
void dump_config() override
BME280Oversampling pressure_oversampling_
sensor::Sensor * temperature_sensor_
uint16_t read_u16_le_(uint8_t a_register)
virtual bool read_bytes(uint8_t a_register, uint8_t *data, size_t len)=0
float read_temperature_(const uint8_t *data, int32_t *t_fine)
Read the temperature value and store the calculated ambient temperature in t_fine.
Base-class for all sensors.
BME280Oversampling
Enum listing all Oversampling values for the BME280.
@ BME280_OVERSAMPLING_16X
@ BME280_OVERSAMPLING_NONE
BME280IIRFilter
Enum listing all Infinite Impulse Filter values for the BME280.
Providing packet encoding functions for exchanging data with a remote host.
Internal struct storing the calibration values of an BME280.