turning off the heater
This commit is contained in:
parent
71f4eb2c71
commit
d8fddb9505
14
main.cpp
14
main.cpp
|
|
@ -24,9 +24,9 @@ int main()
|
||||||
}
|
}
|
||||||
// 3) Configure T/H/P oversampling + 1 s standby (ODR) for continuous reads
|
// 3) Configure T/H/P oversampling + 1 s standby (ODR) for continuous reads
|
||||||
struct bme68x_conf conf = {};
|
struct bme68x_conf conf = {};
|
||||||
conf.os_temp = BME68X_OS_4X;
|
conf.os_temp = BME68X_OS_16X;
|
||||||
conf.os_pres = BME68X_OS_2X;
|
conf.os_pres = BME68X_OS_4X;
|
||||||
conf.os_hum = BME68X_OS_1X;
|
conf.os_hum = BME68X_OS_4X;
|
||||||
conf.filter = BME68X_FILTER_SIZE_3;
|
conf.filter = BME68X_FILTER_SIZE_3;
|
||||||
conf.odr = BME68X_ODR_1000_MS; // 1 000 ms standby :contentReference[oaicite:0]{index=0}
|
conf.odr = BME68X_ODR_1000_MS; // 1 000 ms standby :contentReference[oaicite:0]{index=0}
|
||||||
int8_t rslt=0;
|
int8_t rslt=0;
|
||||||
|
|
@ -37,6 +37,14 @@ int main()
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct bme68x_heatr_conf heatr_conf={};
|
||||||
|
heatr_conf.enable=BME68X_DISABLE;
|
||||||
|
rslt = bme68x_set_heatr_conf(BME68X_SLEEP_MODE,&heatr_conf, &dev);
|
||||||
|
if (rslt != BME68X_OK) {
|
||||||
|
std::cerr << "ERROR: set_heatr_conf failed (" << int(rslt) << ")\n";
|
||||||
|
bme68x_interface_deinit(&dev);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
// 4) Start continuous (sequential) mode
|
// 4) Start continuous (sequential) mode
|
||||||
rslt = bme68x_set_op_mode(BME68X_SEQUENTIAL_MODE, &dev);
|
rslt = bme68x_set_op_mode(BME68X_SEQUENTIAL_MODE, &dev);
|
||||||
if (rslt != BME68X_OK) {
|
if (rslt != BME68X_OK) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user