diff --git a/ampel-firmware/co2_sensor.cpp b/ampel-firmware/co2_sensor.cpp index 7110776f7ab9362e431917afa8ebc84cd8bcb653..34c89ab244be2d6b171e6a450e9cf9edec1fa22e 100644 --- a/ampel-firmware/co2_sensor.cpp +++ b/ampel-firmware/co2_sensor.cpp @@ -39,6 +39,7 @@ namespace sensor { * SDA --- SDA (GPIO21) //NOTE: GPIO1 would be more convenient (right next to GPO3) */ #endif + scd30.enableDebugging(); // CO2 if (scd30.begin(config::auto_calibrate_sensor) == false) { @@ -68,6 +69,38 @@ namespace sensor { Serial.print(F("Auto-calibration is ")); Serial.println(config::auto_calibrate_sensor ? "ON." : "OFF."); + + Serial.println("----------------------------------------"); + uint16_t settingVal; // The settings will be returned in settingVal + if (scd30.getForcedRecalibration(&settingVal)) { + Serial.print(F("Forced recalibration factor (ppm) is ")); + Serial.println(settingVal); + } + + if (scd30.getMeasurementInterval(&settingVal)) { + Serial.print(F("Measurement interval (s) is ")); + Serial.println(settingVal); + } + + if (scd30.getTemperatureOffset(&settingVal)) { + Serial.print(F("Temperature offset (C) is ")); + Serial.println(((float) settingVal) / 100.0, 2); + } + + if (scd30.getAltitudeCompensation(&settingVal)) { + Serial.print(F("Altitude offset (m) is ")); + Serial.println(settingVal); + } + + if (scd30.getFirmwareVersion(&settingVal)) { + Serial.print("Firmware version is 0x"); + Serial.println(settingVal, HEX); + } + + Serial.print(F("Auto calibration set to ")); + Serial.println(scd30.getAutoSelfCalibration() ? "true" : "false"); + + Serial.println("----------------------------------------"); } //NOTE: should timer deviation be used to adjust measurement_timestep?