mirror of
https://github.com/revspace/operame
synced 2024-12-13 01:57:30 +00:00
add "first boot" check
This commit is contained in:
parent
f6acffac8f
commit
6da553be6f
@ -561,6 +561,15 @@ void loop() {
|
|||||||
static int co2;
|
static int co2;
|
||||||
static float h;
|
static float h;
|
||||||
static float t;
|
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) {
|
every(60000) {
|
||||||
// Read CO2, humidity and temperature
|
// Read CO2, humidity and temperature
|
||||||
|
Loading…
Reference in New Issue
Block a user