Commit fe023428 authored by Käppler's avatar Käppler
Browse files

co2_sensor: Reset SCD30 after startup

Sometimes after a hard reset of the ESP the SCD30
needs a long time until returning the first measurement.
Resetting it after startup seems to fix this behaviour.
parent 6751d607
......@@ -83,6 +83,11 @@ namespace sensor {
ESP.restart();
}
// Changes of the SCD30's measurement timestep do not come into effect
// before the next measurement takes place. That means that after a hard reset
// of the ESP the SCD30 sometimes needs a long time until switching back to 2 s
// for acclimatization. Resetting it after startup seems to fix this behaviour.
scd30.reset();
switchState(BOOTUP);
Serial.print(F("Setting temperature offset to -"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment