23-06-2022, 10:39
Just been reading about in the Source code & saw this,
And then found it points to this,
So I opened the URL 192.168.xx.xx/Calib_CO2 & see this,
[attachment=3097]
So what has that process actually done?
The device I executed it on has an SCD30, but also have another with an MH_19Z.
Is there any explanation posted anywhere or can you provide a basic outline.
Thanks
Phil
Code:
#if (CO2_SENSORTYPE != 0)
server.on("/calib_CO2", HTTP_GET, calibrate_CO2);
#endif
And then found it points to this,
Code:
//---------------------------------------------------------
// Execute Forced CO2 Calibration Command
//---------------------------------------------------------
#if (ENABLE_WIFI == 1 && CO2_SENSORTYPE != 0)
void calibrate_CO2()
{
String Data = F("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nConnection: close\r\n");
Data += F("\r\n\r\n");
Data += F("<html><head><title>Air Quality Monitor</title>");
Data += F("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">");
Data += F("<link rel=\"shortcut icon\" href=\"http://www.weatherduino.com/favicon.ico\" type=\"image/x-icon\" />");
Data += F("<style type=\"text/css\">tab1 { padding-left: 1em; }</style></head>");
Data += F("<body bgcolor=\"#000000\">");
Data += F("<table><tr><td width=\"800\" align=\"center\" bgcolor=\"#D2D2D2\">");
Data += F("<h2>WeatherDuino<br>Air Quality Monitor III</h2><h3>");
sprintf(CHAR_buf, "%d-%02d-%02d %02d:%02d", timeinfo.tm_year +1900, timeinfo.tm_mon +1, timeinfo.tm_mday, timeinfo.tm_hour, timeinfo.tm_min);
Data += CHAR_buf;
Data += F("</h3></td></tr></table><br>");
Data += F("<table><tr><td width=\"800\" bgcolor=\"#006666\">");
Data += F("<font color=\"#D4FFFF\"><center><b>");
Data += F("<br>FORCED CO2 CALIBRATION COMMAND EXECUTED<br><br>");
Data += F("You can close this page now.<br>");
Data += F("</b><br><br></center></td></tr></table>");
Data += F("</body></html>");
server.send(200, "text/html", Data);
Data = "";
#if (CO2_SENSORTYPE == 1)
SCD30sensor.setForcedRecalibrationFactor(408);
delay(6); // Minimum >3ms
#endif
#if (CO2_SENSORTYPE == 2)
MH_Z19_ZerPointCal();
read_Z19();
#endif
}
#endif
So I opened the URL 192.168.xx.xx/Calib_CO2 & see this,
[attachment=3097]
So what has that process actually done?
The device I executed it on has an SCD30, but also have another with an MH_19Z.
Is there any explanation posted anywhere or can you provide a basic outline.
Thanks
Phil