forked from github/ebk_co2ampel
Direkt nach dem Booten schonmal einen CO2 Wert lesen weil da meistens zuerst Mist kommt.
This commit is contained in:
parent
177a90e773
commit
0304cdf8b2
1 changed files with 5 additions and 1 deletions
|
@ -81,6 +81,7 @@ void toggleBootMode(int bootMode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
int dummy;
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
Serial.println("Starte...");
|
Serial.println("Starte...");
|
||||||
Serial.print("CO2-Ampel Firmware: ");Serial.println(ampelversion);
|
Serial.print("CO2-Ampel Firmware: ");Serial.println(ampelversion);
|
||||||
|
@ -130,6 +131,7 @@ void setup() {
|
||||||
Serial.print("Temperature Cal: "); Serial.println(myMHZ19.getTempAdjustment());
|
Serial.print("Temperature Cal: "); Serial.println(myMHZ19.getTempAdjustment());
|
||||||
Serial.print("ABC Status: "); myMHZ19.getABC() ? Serial.println("ON") : Serial.println("OFF");
|
Serial.print("ABC Status: "); myMHZ19.getABC() ? Serial.println("ON") : Serial.println("OFF");
|
||||||
Serial.print("read EEPROM value: "); Serial.println(currentBootMode);
|
Serial.print("read EEPROM value: "); Serial.println(currentBootMode);
|
||||||
|
Serial.print("First CO2 value: "); Serial.println(readCO2());
|
||||||
|
|
||||||
// Liste der Messwerte mit "-1" befüllen ("-1" wird beinm Graph nicht gezeichnet)
|
// Liste der Messwerte mit "-1" befüllen ("-1" wird beinm Graph nicht gezeichnet)
|
||||||
for (int x = 0; x <= 119; x = x + 1) {
|
for (int x = 0; x <= 119; x = x + 1) {
|
||||||
|
@ -142,6 +144,8 @@ void setup() {
|
||||||
pixels.fill(pixels.Color(0,0,0));
|
pixels.fill(pixels.Color(0,0,0));
|
||||||
pixels.show();
|
pixels.show();
|
||||||
|
|
||||||
|
// Wir lesen schonmal einen CO2 Sensorwert, da die erste Werte meist Müll sind
|
||||||
|
delay (5000); dummy = readCO2();
|
||||||
}
|
}
|
||||||
|
|
||||||
int calc_vpos_for_co2(int co2val, int display_height) {
|
int calc_vpos_for_co2(int co2val, int display_height) {
|
||||||
|
|
Loading…
Reference in a new issue