1
0
mirror of https://github.com/revspace/operame synced 2024-12-12 17:47:29 +00:00

add "first boot" check

This commit is contained in:
Pieter De Mil 2022-04-20 17:34:54 +02:00
parent f6acffac8f
commit 6da553be6f

View File

@ -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();