Commit 8d49d71c 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 9362f3f3
Pipeline #3282 passed with stage
in 1 minute and 43 seconds
......@@ -83,6 +83,10 @@ namespace sensor {
ESP.restart();
}
// 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.
scd30.reset();
switchState(BOOTUP);
Serial.print(F("Setting temperature offset to -"));
......
  • Interesting. Is the behaviour documented somewhere? I think that the old measurement interval is kept after a restart. So if it was 60s, it might take almost a minute before the interval is set to 2s.

    I also would like to know if it has any influence on the auto-calibration feature, which should run for 7 days without interruption.

    Once again, the scd30 is a black box, and I don't understand its behaviour. :-/

  • I don't really know. I must admit that I did not read the SCD30 documentation yet, apart from the datasheet. Your explanation (that the old measurement interval is kept until the next measurement) makes sense. Regarding auto-calibration, if you reset the ESP that would not count as "running without interruption" either, even without explicitly resetting the SCD30, too?

Markdown is supported
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