ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
bme680.cpp
Go to the documentation of this file.
1#include "bme680.h"
2#include "esphome/core/hal.h"
3#include "esphome/core/log.h"
4
5namespace esphome::bme680 {
6
7static const char *const TAG = "bme680.sensor";
8
9static const uint8_t BME680_REGISTER_COEFF1 = 0x89;
10static const uint8_t BME680_REGISTER_COEFF2 = 0xE1;
11
12static const uint8_t BME680_REGISTER_CONFIG = 0x75;
13static const uint8_t BME680_REGISTER_CONTROL_MEAS = 0x74;
14static const uint8_t BME680_REGISTER_CONTROL_HUMIDITY = 0x72;
15static const uint8_t BME680_REGISTER_CONTROL_GAS1 = 0x71;
16static const uint8_t BME680_REGISTER_CONTROL_GAS0 = 0x70;
17static const uint8_t BME680_REGISTER_HEATER_HEAT0 = 0x5A;
18static const uint8_t BME680_REGISTER_HEATER_WAIT0 = 0x64;
19
20static const uint8_t BME680_REGISTER_CHIPID = 0xD0;
21
22static const uint8_t BME680_REGISTER_FIELD0 = 0x1D;
23
24constexpr float BME680_GAS_LOOKUP_TABLE_1[16] PROGMEM = {0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, -0.8,
25 0.0, 0.0, -0.2, -0.5, 0.0, -1.0, 0.0, 0.0};
26
27constexpr float BME680_GAS_LOOKUP_TABLE_2[16] PROGMEM = {0.0, 0.0, 0.0, 0.0, 0.1, 0.7, 0.0, -0.8,
28 -0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
29
30[[maybe_unused]] static const char *oversampling_to_str(BME680Oversampling oversampling) {
31 switch (oversampling) {
33 return "None";
35 return "1x";
37 return "2x";
39 return "4x";
41 return "8x";
43 return "16x";
44 default:
45 return "UNKNOWN";
46 }
47}
48
49[[maybe_unused]] static const char *iir_filter_to_str(BME680IIRFilter filter) {
50 switch (filter) {
52 return "OFF";
54 return "1x";
56 return "3x";
58 return "7x";
60 return "15x";
62 return "31x";
64 return "63x";
66 return "127x";
67 default:
68 return "UNKNOWN";
69 }
70}
71
73 uint8_t chip_id;
74 if (!this->read_byte(BME680_REGISTER_CHIPID, &chip_id) || chip_id != 0x61) {
75 this->mark_failed();
76 return;
77 }
78
79 // Read calibration
80 uint8_t coeff1[25];
81 if (!this->read_bytes(BME680_REGISTER_COEFF1, coeff1, 25)) {
82 this->mark_failed();
83 return;
84 }
85 uint8_t coeff2[16];
86 if (!this->read_bytes(BME680_REGISTER_COEFF2, coeff2, 16)) {
87 this->mark_failed();
88 return;
89 }
90
91 this->calibration_.t1 = coeff2[9] << 8 | coeff2[8];
92 this->calibration_.t2 = coeff1[2] << 8 | coeff1[1];
93 this->calibration_.t3 = coeff1[3];
94
95 this->calibration_.h1 = coeff2[2] << 4 | (coeff2[1] & 0x0F);
96 this->calibration_.h2 = coeff2[0] << 4 | coeff2[1] >> 4;
97 this->calibration_.h3 = coeff2[3];
98 this->calibration_.h4 = coeff2[4];
99 this->calibration_.h5 = coeff2[5];
100 this->calibration_.h6 = coeff2[6];
101 this->calibration_.h7 = coeff2[7];
102
103 this->calibration_.p1 = coeff1[6] << 8 | coeff1[5];
104 this->calibration_.p2 = coeff1[8] << 8 | coeff1[7];
105 this->calibration_.p3 = coeff1[9];
106 this->calibration_.p4 = coeff1[12] << 8 | coeff1[11];
107 this->calibration_.p5 = coeff1[14] << 8 | coeff1[13];
108 this->calibration_.p6 = coeff1[16];
109 this->calibration_.p7 = coeff1[15];
110 this->calibration_.p8 = coeff1[20] << 8 | coeff1[19];
111 this->calibration_.p9 = coeff1[22] << 8 | coeff1[21];
112 this->calibration_.p10 = coeff1[23];
113
114 this->calibration_.gh1 = coeff2[14];
115 this->calibration_.gh2 = coeff2[12] << 8 | coeff2[13];
116 this->calibration_.gh3 = coeff2[15];
117
118 uint8_t temp_var = 0;
119 if (!this->read_byte(0x02, &temp_var)) {
120 this->mark_failed();
121 return;
122 }
123 this->calibration_.res_heat_range = ((temp_var & 0x30) / 16);
124
125 if (!this->read_byte(0x00, &temp_var)) {
126 this->mark_failed();
127 return;
128 }
129 this->calibration_.res_heat_val = (int8_t) temp_var;
130
131 if (!this->read_byte(0x04, &temp_var)) {
132 this->mark_failed();
133 return;
134 }
135 this->calibration_.range_sw_err = ((int8_t) temp_var & (int8_t) 0xf0) / 16;
136
137 this->calibration_.ambient_temperature = 25; // prime ambient temperature
138
139 // Config register
140 uint8_t config_register;
141 if (!this->read_byte(BME680_REGISTER_CONFIG, &config_register)) {
142 this->mark_failed();
143 return;
144 }
145 config_register &= ~0b00011100;
146 config_register |= (this->iir_filter_ & 0b111) << 2;
147 if (!this->write_byte(BME680_REGISTER_CONFIG, config_register)) {
148 this->mark_failed();
149 return;
150 }
151
152 // Humidity control register
153 uint8_t hum_control;
154 if (!this->read_byte(BME680_REGISTER_CONTROL_HUMIDITY, &hum_control)) {
155 this->mark_failed();
156 return;
157 }
158 hum_control &= ~0b00000111;
159 hum_control |= this->humidity_oversampling_ & 0b111;
160 if (!this->write_byte(BME680_REGISTER_CONTROL_HUMIDITY, hum_control)) {
161 this->mark_failed();
162 return;
163 }
164
165 // Gas 1 control register
166 uint8_t gas1_control;
167 if (!this->read_byte(BME680_REGISTER_CONTROL_GAS1, &gas1_control)) {
168 this->mark_failed();
169 return;
170 }
171 gas1_control &= ~0b00011111;
172 gas1_control |= 1 << 4;
173 gas1_control |= 0; // profile 0
174 if (!this->write_byte(BME680_REGISTER_CONTROL_GAS1, gas1_control)) {
175 this->mark_failed();
176 return;
177 }
178
179 const bool heat_off = this->heater_temperature_ == 0 || this->heater_duration_ == 0;
180
181 // Gas 0 control register
182 uint8_t gas0_control;
183 if (!this->read_byte(BME680_REGISTER_CONTROL_GAS0, &gas0_control)) {
184 this->mark_failed();
185 return;
186 }
187 gas0_control &= ~0b00001000;
188 gas0_control |= heat_off << 3;
189 if (!this->write_byte(BME680_REGISTER_CONTROL_GAS0, gas0_control)) {
190 this->mark_failed();
191 return;
192 }
193
194 if (!heat_off) {
195 // Gas Heater Temperature
197 if (!this->write_byte(BME680_REGISTER_HEATER_HEAT0, temperature)) {
198 this->mark_failed();
199 return;
200 }
201
202 // Gas Heater Duration
203 uint8_t duration = this->calc_heater_duration_(this->heater_duration_);
204
205 if (!this->write_byte(BME680_REGISTER_HEATER_WAIT0, duration)) {
206 this->mark_failed();
207 return;
208 }
209 }
210}
211
213 ESP_LOGCONFIG(TAG, "BME680:");
214 LOG_I2C_DEVICE(this);
215 if (this->is_failed()) {
216 ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
217 }
218 ESP_LOGCONFIG(TAG, " IIR Filter: %s", iir_filter_to_str(this->iir_filter_));
219 LOG_UPDATE_INTERVAL(this);
220
221 LOG_SENSOR(" ", "Temperature", this->temperature_sensor_);
222 ESP_LOGCONFIG(TAG, " Oversampling: %s", oversampling_to_str(this->temperature_oversampling_));
223 LOG_SENSOR(" ", "Pressure", this->pressure_sensor_);
224 ESP_LOGCONFIG(TAG, " Oversampling: %s", oversampling_to_str(this->pressure_oversampling_));
225 LOG_SENSOR(" ", "Humidity", this->humidity_sensor_);
226 ESP_LOGCONFIG(TAG, " Oversampling: %s", oversampling_to_str(this->humidity_oversampling_));
227 LOG_SENSOR(" ", "Gas Resistance", this->gas_resistance_sensor_);
228 if (this->heater_duration_ == 0 || this->heater_temperature_ == 0) {
229 ESP_LOGCONFIG(TAG, " Heater OFF");
230 } else {
231 ESP_LOGCONFIG(TAG, " Heater temperature=%u°C duration=%ums", this->heater_temperature_, this->heater_duration_);
232 }
233}
234
236 uint8_t meas_control = 0; // No need to fetch, we're setting all fields
237 meas_control |= (this->temperature_oversampling_ & 0b111) << 5;
238 meas_control |= (this->pressure_oversampling_ & 0b111) << 2;
239 meas_control |= 0b01; // forced mode
240 if (!this->write_byte(BME680_REGISTER_CONTROL_MEAS, meas_control)) {
241 this->status_set_warning();
242 return;
243 }
244
245 this->set_timeout("data", this->calc_meas_duration_(), [this]() { this->read_data_(); });
246}
247
249 if (temperature < 200)
250 temperature = 200;
251 if (temperature > 400)
252 temperature = 400;
253
254 const int8_t ambient_temperature = this->calibration_.ambient_temperature;
255 const int8_t gh1 = this->calibration_.gh1;
256 const int16_t gh2 = this->calibration_.gh2;
257 const int8_t gh3 = this->calibration_.gh3;
258 const uint8_t res_heat_range = this->calibration_.res_heat_range;
259 const int8_t res_heat_val = this->calibration_.res_heat_val;
260
261 uint8_t heatr_res;
262 int32_t var1;
263 int32_t var2;
264 int32_t var3;
265 int32_t var4;
266 int32_t var5;
267 int32_t heatr_res_x100;
268
269 var1 = (((int32_t) ambient_temperature * gh3) / 1000) * 256;
270 var2 = (gh1 + 784) * (((((gh2 + 154009) * temperature * 5) / 100) + 3276800) / 10);
271 var3 = var1 + (var2 / 2);
272 var4 = (var3 / (res_heat_range + 4));
273 var5 = (131 * res_heat_val) + 65536;
274 heatr_res_x100 = (int32_t) (((var4 / var5) - 250) * 34);
275 heatr_res = (uint8_t) ((heatr_res_x100 + 50) / 100);
276
277 return heatr_res;
278}
280 uint8_t factor = 0;
281 uint8_t duration_value;
282
283 if (duration >= 0xfc0) {
284 duration_value = 0xff;
285 } else {
286 while (duration > 0x3F) {
287 duration /= 4;
288 factor += 1;
289 }
290 duration_value = duration + (factor * 64);
291 }
292
293 return duration_value;
294}
296 uint8_t data[15];
297 if (!this->read_bytes(BME680_REGISTER_FIELD0, data, 15)) {
298 if (this->temperature_sensor_ != nullptr)
300 if (this->pressure_sensor_ != nullptr)
302 if (this->humidity_sensor_ != nullptr)
304 if (this->gas_resistance_sensor_ != nullptr)
306 ESP_LOGW(TAG, ESP_LOG_MSG_COMM_FAIL);
307 this->status_set_warning();
308 return;
309 }
310 this->status_clear_warning();
311
312 uint32_t raw_temperature = (uint32_t(data[5]) << 12) | (uint32_t(data[6]) << 4) | (uint32_t(data[7]) >> 4);
313 uint32_t raw_pressure = (uint32_t(data[2]) << 12) | (uint32_t(data[3]) << 4) | (uint32_t(data[4]) >> 4);
314 uint32_t raw_humidity = (uint32_t(data[8]) << 8) | uint32_t(data[9]);
315 uint16_t raw_gas = (uint16_t) ((uint32_t) data[13] * 4 | (((uint32_t) data[14]) / 64));
316 uint8_t gas_range = data[14] & 0x0F;
317
318 float temperature = this->calc_temperature_(raw_temperature);
319 float pressure = this->calc_pressure_(raw_pressure);
320 float humidity = this->calc_humidity_(raw_humidity);
321 float gas_resistance = this->calc_gas_resistance_(raw_gas, gas_range);
322
323 bool gas_valid = (data[14] >> 5) & 1;
324 bool heat_stable = (data[14] >> 4) & 1;
325 if (this->heater_temperature_ == 0 || this->heater_duration_ == 0)
326 heat_stable = true; // Allow reporting gas resistance when heater is disabled
327
328 ESP_LOGD(TAG, "Got temperature=%.1f°C pressure=%.1fhPa humidity=%.1f%% gas_resistance=%.1fΩ", temperature, pressure,
329 humidity, gas_resistance);
330 if (!gas_valid)
331 ESP_LOGW(TAG, "Gas measurement unsuccessful, reading invalid!");
332 if (!heat_stable)
333 ESP_LOGW(TAG, "Heater unstable, reading invalid! (Normal for a few readings after a power cycle)");
334
335 if (this->temperature_sensor_ != nullptr)
336 this->temperature_sensor_->publish_state(temperature);
337 if (this->pressure_sensor_ != nullptr)
338 this->pressure_sensor_->publish_state(pressure);
339 if (this->humidity_sensor_ != nullptr)
340 this->humidity_sensor_->publish_state(humidity);
341 if (this->gas_resistance_sensor_ != nullptr) {
342 if (gas_valid && heat_stable) {
343 this->gas_resistance_sensor_->publish_state(gas_resistance);
344 } else {
345 this->status_set_warning();
347 }
348 }
349}
350
352 float var1 = 0;
353 float var2 = 0;
354 float var3 = 0;
355 float calc_temp = 0;
356 float temp_adc = raw_temperature;
357
358 const float t1 = this->calibration_.t1;
359 const float t2 = this->calibration_.t2;
360 const float t3 = this->calibration_.t3;
361
362 /* calculate var1 data */
363 var1 = ((temp_adc / 16384.0f) - (t1 / 1024.0f)) * t2;
364
365 /* calculate var2 data */
366 var3 = (temp_adc / 131072.0f) - (t1 / 8192.0f);
367 var2 = var3 * var3 * t3 * 16.0f;
368
369 /* t_fine value*/
370 this->calibration_.tfine = (var1 + var2);
371
372 /* compensated temperature data*/
373 calc_temp = ((this->calibration_.tfine) / 5120.0f);
374
375 return calc_temp;
376}
378 const float tfine = this->calibration_.tfine;
379 const float p1 = this->calibration_.p1;
380 const float p2 = this->calibration_.p2;
381 const float p3 = this->calibration_.p3;
382 const float p4 = this->calibration_.p4;
383 const float p5 = this->calibration_.p5;
384 const float p6 = this->calibration_.p6;
385 const float p7 = this->calibration_.p7;
386 const float p8 = this->calibration_.p8;
387 const float p9 = this->calibration_.p9;
388 const float p10 = this->calibration_.p10;
389
390 float var1 = 0;
391 float var2 = 0;
392 float var3 = 0;
393 float var4 = 0;
394 float calc_pres = 0;
395
396 var1 = (tfine / 2.0f) - 64000.0f;
397 var2 = var1 * var1 * (p6 / 131072.0f);
398 var2 = var2 + var1 * p5 * 2.0f;
399 var2 = (var2 / 4.0f) + (p4 * 65536.0f);
400 var1 = (((p3 * var1 * var1) / 16384.0f) + (p2 * var1)) / 524288.0f;
401 var1 = (1.0f + (var1 / 32768.0f)) * p1;
402 calc_pres = 1048576.0f - float(raw_pressure);
403
404 /* Avoid exception caused by division by zero */
405 if (int(var1) != 0) {
406 calc_pres = ((calc_pres - (var2 / 4096.0f)) * 6250.0f) / var1;
407 var1 = (p9 * calc_pres * calc_pres) / 2147483648.0f;
408 var2 = calc_pres * (p8 / 32768.0f);
409 var4 = calc_pres / 256.0f;
410 var3 = var4 * var4 * var4 * (p10 / 131072.0f);
411 calc_pres = calc_pres + (var1 + var2 + var3 + (p7 * 128.0f)) / 16.0f;
412 } else {
413 calc_pres = 0;
414 }
415
416 return calc_pres / 100.0f;
417}
418
419float BME680Component::calc_humidity_(uint16_t raw_humidity) {
420 const float tfine = this->calibration_.tfine;
421 const float h1 = this->calibration_.h1;
422 const float h2 = this->calibration_.h2;
423 const float h3 = this->calibration_.h3;
424 const float h4 = this->calibration_.h4;
425 const float h5 = this->calibration_.h5;
426 const float h6 = this->calibration_.h6;
427 const float h7 = this->calibration_.h7;
428
429 float calc_hum = 0;
430 float var1 = 0;
431 float var2 = 0;
432 float var3 = 0;
433 float var4 = 0;
434 float temp_comp;
435
436 /* compensated temperature data*/
437 temp_comp = tfine / 5120.0f;
438
439 var1 = float(raw_humidity) - (h1 * 16.0f + ((h3 / 2.0f) * temp_comp));
440 var2 = var1 *
441 (((h2 / 262144.0f) * (1.0f + ((h4 / 16384.0f) * temp_comp) + ((h5 / 1048576.0f) * temp_comp * temp_comp))));
442 var3 = h6 / 16384.0f;
443 var4 = h7 / 2097152.0f;
444
445 calc_hum = var2 + (var3 + var4 * temp_comp) * var2 * var2;
446
447 if (calc_hum > 100.0f) {
448 calc_hum = 100.0f;
449 } else if (calc_hum < 0.0f) {
450 calc_hum = 0.0f;
451 }
452
453 return calc_hum;
454}
455float BME680Component::calc_gas_resistance_(uint16_t raw_gas, uint8_t range) {
456 float calc_gas_res;
457 float var1 = 0;
458 float var2 = 0;
459 float var3 = 0;
460 float raw_gas_f = raw_gas;
461 float range_f = 1U << range;
462 const float range_sw_err = this->calibration_.range_sw_err;
463
464 var1 = 1340.0f + (5.0f * range_sw_err);
465 var2 = var1 * (1.0f + BME680_GAS_LOOKUP_TABLE_1[range] / 100.0f);
466 var3 = 1.0f + (BME680_GAS_LOOKUP_TABLE_2[range] / 100.0f);
467
468 calc_gas_res = 1.0f / (var3 * 0.000000125f * range_f * (((raw_gas_f - 512.0f) / var2) + 1.0f));
469
470 return calc_gas_res;
471}
473 uint32_t tph_dur; // Calculate in us
474 uint32_t meas_cycles;
475 const uint8_t os_to_meas_cycles[6] = {0, 1, 2, 4, 8, 16};
476
477 meas_cycles = os_to_meas_cycles[this->temperature_oversampling_];
478 meas_cycles += os_to_meas_cycles[this->pressure_oversampling_];
479 meas_cycles += os_to_meas_cycles[this->humidity_oversampling_];
480
481 /* TPH measurement duration */
482 tph_dur = meas_cycles * 1963u;
483 tph_dur += 477 * 4; // TPH switching duration
484 tph_dur += 477 * 5; // Gas measurement duration
485 tph_dur += 500; // Get it to the closest whole number.
486 tph_dur /= 1000; // Convert to ms
487
488 tph_dur += 1; // Wake up duration of 1ms
489
490 /* The remaining time should be used for heating */
491 tph_dur += this->heater_duration_;
492
493 return tph_dur;
494}
496 this->temperature_oversampling_ = temperature_oversampling;
497}
499 this->pressure_oversampling_ = pressure_oversampling;
500}
502 this->humidity_oversampling_ = humidity_oversampling;
503}
504void BME680Component::set_iir_filter(BME680IIRFilter iir_filter) { this->iir_filter_ = iir_filter; }
505void BME680Component::set_heater(uint16_t heater_temperature, uint16_t heater_duration) {
506 this->heater_temperature_ = heater_temperature;
507 this->heater_duration_ = heater_duration;
508}
509
510} // namespace esphome::bme680
void mark_failed()
Mark this component as failed.
bool is_failed() const
Definition component.h:272
ESPDEPRECATED("Use const char* or uint32_t overload instead. Removed in 2026.7.0", "2026.1.0") void set_timeout(const std voi set_timeout)(const char *name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a unique name.
Definition component.h:493
void status_clear_warning()
Definition component.h:289
uint8_t calc_heater_duration_(uint16_t duration)
Calculate the heater duration value to send to the BME680 register.
Definition bme680.cpp:279
void read_data_()
Read data from the BME680 and publish results.
Definition bme680.cpp:295
sensor::Sensor * humidity_sensor_
Definition bme680.h:132
uint8_t calc_heater_resistance_(uint16_t temperature)
Calculate the heater resistance value to send to the BME680 register.
Definition bme680.cpp:248
float calc_humidity_(uint16_t raw_humidity)
Calculate the relative humidity in % using the provided raw ADC value.
Definition bme680.cpp:419
BME680Oversampling pressure_oversampling_
Definition bme680.h:124
BME680CalibrationData calibration_
Definition bme680.h:122
void set_pressure_oversampling(BME680Oversampling pressure_oversampling)
Set the pressure oversampling value. Defaults to 16X.
Definition bme680.cpp:498
BME680Oversampling temperature_oversampling_
Definition bme680.h:123
BME680Oversampling humidity_oversampling_
Definition bme680.h:125
void set_temperature_oversampling(BME680Oversampling temperature_oversampling)
Set the temperature oversampling value. Defaults to 16X.
Definition bme680.cpp:495
sensor::Sensor * temperature_sensor_
Definition bme680.h:130
float calc_gas_resistance_(uint16_t raw_gas, uint8_t range)
Calculate the gas resistance in Ω using the provided raw ADC value.
Definition bme680.cpp:455
void set_heater(uint16_t heater_temperature, uint16_t heater_duration)
Set how the internal heater should operate.
Definition bme680.cpp:505
sensor::Sensor * pressure_sensor_
Definition bme680.h:131
void set_iir_filter(BME680IIRFilter iir_filter)
Set the IIR Filter value. Defaults to no IIR Filter.
Definition bme680.cpp:504
uint32_t calc_meas_duration_()
Calculate how long the sensor will take until we can retrieve data.
Definition bme680.cpp:472
float calc_temperature_(uint32_t raw_temperature)
Calculate the temperature in °C using the provided raw ADC value.
Definition bme680.cpp:351
void set_humidity_oversampling(BME680Oversampling humidity_oversampling)
Set the humidity oversampling value. Defaults to 16X.
Definition bme680.cpp:501
float calc_pressure_(uint32_t raw_pressure)
Calculate the pressure in hPa using the provided raw ADC value.
Definition bme680.cpp:377
sensor::Sensor * gas_resistance_sensor_
Definition bme680.h:133
BME680IIRFilter iir_filter_
Definition bme680.h:126
bool write_byte(uint8_t a_register, uint8_t data) const
Definition i2c.h:265
bool read_byte(uint8_t a_register, uint8_t *data)
Definition i2c.h:240
bool read_bytes(uint8_t a_register, uint8_t *data, uint8_t len)
Compat APIs All methods below have been added for compatibility reasons.
Definition i2c.h:217
void publish_state(float state)
Publish a new state to the front-end.
Definition sensor.cpp:68
Range range
Definition msa3xx.h:0
uint8_t duration
Definition msa3xx.h:0
const char * iir_filter_to_str(BME280IIRFilter filter)
BME680IIRFilter
Enum listing all IIR Filter options for the BME680.
Definition bme680.h:10
@ BME680_IIR_FILTER_63X
Definition bme680.h:17
@ BME680_IIR_FILTER_15X
Definition bme680.h:15
@ BME680_IIR_FILTER_OFF
Definition bme680.h:11
@ BME680_IIR_FILTER_3X
Definition bme680.h:13
@ BME680_IIR_FILTER_31X
Definition bme680.h:16
@ BME680_IIR_FILTER_127X
Definition bme680.h:18
@ BME680_IIR_FILTER_7X
Definition bme680.h:14
@ BME680_IIR_FILTER_1X
Definition bme680.h:12
constexpr float BME680_GAS_LOOKUP_TABLE_1[16] PROGMEM
Definition bme680.cpp:24
BME680Oversampling
Enum listing all oversampling options for the BME680.
Definition bme680.h:22
@ BME680_OVERSAMPLING_2X
Definition bme680.h:25
@ BME680_OVERSAMPLING_4X
Definition bme680.h:26
@ BME680_OVERSAMPLING_16X
Definition bme680.h:28
@ BME680_OVERSAMPLING_NONE
Definition bme680.h:23
@ BME680_OVERSAMPLING_8X
Definition bme680.h:27
@ BME680_OVERSAMPLING_1X
Definition bme680.h:24
static void uint32_t
uint16_t temperature
Definition sun_gtil2.cpp:12
uint8_t pressure
Definition tt21100.cpp:7