From 6da553be6f13e927b84a076ffc5fde72fc36225d Mon Sep 17 00:00:00 2001 From: Pieter De Mil Date: Wed, 20 Apr 2022 17:34:54 +0200 Subject: [PATCH] add "first boot" check --- operame.ino | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/operame.ino b/operame.ino index 878fd16..faf04ed 100644 --- a/operame.ino +++ b/operame.ino @@ -561,7 +561,16 @@ void loop() { static int co2; static float h; static float t; + static bool first_boot = true; + if(first_boot) + { + co2 = get_co2(); + h = dht.readHumidity(); + t = dht.readTemperature(); + first_boot = false; + } + every(60000) { // Read CO2, humidity and temperature co2 = get_co2();