From a51d525b75ead2c23ef83795d8ff60b76796d72c Mon Sep 17 00:00:00 2001 From: gregor herrmann Date: Wed, 28 Oct 2020 16:35:14 +0100 Subject: [PATCH] warn during warmup output a warning '(W)' after the co2 value during the first minute, if the value is -1 or 410 which seems to happen each time after powering the board on for a couple of measurements. --- airingbutler.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airingbutler.ino b/airingbutler.ino index 075db34..a446855 100644 --- a/airingbutler.ino +++ b/airingbutler.ino @@ -18,6 +18,7 @@ MHZ19 mhz19 = MHZ19(rx_pin,tx_pin); LiquidCrystal lcd(7, 8, 9, 10, 11, 12); unsigned long time; +unsigned long warmuptime = 60000; // 1 min. int co2 = 0; int temp = 0; int lastppm = 0; @@ -96,6 +97,9 @@ void loop() lcd.setCursor(0, 0); lcd.print("CO2: "); lcd.print(co2); + if (time < warmuptime && (co2 == -1 || co2 == 410)) { + lcd.print (" (W)"); + } lcd.print(" ppm "); lcd.setCursor(0, 1); lcd.print("Temp: "); -- 2.39.5