65 void setup()
override;
70 virtual bool read_byte(uint8_t a_register, uint8_t *data) = 0;
71 virtual bool write_byte(uint8_t a_register, uint8_t data) = 0;
72 virtual bool read_bytes(uint8_t a_register, uint8_t *data,
size_t len) = 0;
80 uint8_t
read_u8_(uint8_t a_register);
This class simplifies creating components that periodically check a state.
This class implements support for the BMP280 Temperature+Pressure sensor.
enum esphome::bmp280_base::BMP280Component::ErrorCode NONE
uint8_t read_u8_(uint8_t a_register)
uint16_t read_u16_le_(uint8_t a_register)
void dump_config() override
int16_t read_s16_le_(uint8_t a_register)
float read_pressure_(int32_t t_fine)
Read the pressure value in hPa using the provided t_fine value.
BMP280IIRFilter iir_filter_
sensor::Sensor * temperature_sensor_
BMP280Oversampling pressure_oversampling_
virtual bool read_bytes(uint8_t a_register, uint8_t *data, size_t len)=0
virtual bool read_byte_16(uint8_t a_register, uint16_t *data)=0
float read_temperature_(int32_t *t_fine)
Read the temperature value and store the calculated ambient temperature in t_fine.
void set_pressure_oversampling(BMP280Oversampling pressure_over_sampling)
Set the oversampling value for the pressure sensor. Default is 16x.
virtual bool write_byte(uint8_t a_register, uint8_t data)=0
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
void set_pressure_sensor(sensor::Sensor *pressure_sensor)
BMP280Oversampling temperature_oversampling_
void set_temperature_oversampling(BMP280Oversampling temperature_over_sampling)
Set the oversampling value for the temperature sensor. Default is 16x.
sensor::Sensor * pressure_sensor_
BMP280CalibrationData calibration_
virtual bool read_byte(uint8_t a_register, uint8_t *data)=0
void set_iir_filter(BMP280IIRFilter iir_filter)
Set the IIR Filter used to increase accuracy, defaults to no IIR Filter.
float get_setup_priority() const override
Base-class for all sensors.
BMP280IIRFilter
Enum listing all Infinite Impulse Filter values for the BMP280.
BMP280Oversampling
Enum listing all Oversampling values for the BMP280.
@ BMP280_OVERSAMPLING_16X
@ BMP280_OVERSAMPLING_NONE
Providing packet encoding functions for exchanging data with a remote host.
Internal struct storing the calibration values of an BMP280.