get bem280 humidity reading working

This commit is contained in:
Travis Shears 2025-04-09 13:21:51 +02:00
parent be5b5ca2d5
commit 28201b6ba5
3 changed files with 62 additions and 58 deletions

View file

@ -19,11 +19,12 @@ typedef struct {
int16_t dig_p9;
// humidity params
uint16_t dig_h1;
uint8_t dig_h1;
int16_t dig_h2;
int16_t dig_h3;
uint8_t dig_h3;
int16_t dig_h4;
int16_t dig_h5;
int8_t dig_h6;
} bme280_compensation_params;
typedef struct {
@ -34,11 +35,11 @@ typedef struct {
typedef struct {
float temperature;
float pressure;
int32_t humidity;
float humidity;
} bme280_reading;
void bme280_init(bme280_config *config, i2c_inst_t *i2c,
uint8_t sda_pin, uint8_t scl_pin);
void bme280_init(bme280_config *config, i2c_inst_t *i2c, uint8_t sda_pin,
uint8_t scl_pin);
bme280_reading bme280_read(bme280_config *config);
#endif /* BME280_H */