get data every minute only

This commit is contained in:
Cedric Girard 2019-05-07 20:52:16 +02:00
parent 55e47e6c8e
commit f36d572070
Signed by: X-dark
GPG key ID: E7D0E125DB9519E4

View file

@ -178,9 +178,9 @@ void loop() {
u8g2log.print(sgp.eCO2); u8g2log.print(sgp.eCO2);
u8g2log.print(" ppm\n"); u8g2log.print(" ppm\n");
//Get Baseline readings every 30s //Get Baseline readings every hour
counter++; counter++;
if (counter == 30) { if (counter == 60) {
counter = 0; counter = 0;
uint16_t TVOC_base, eCO2_base; uint16_t TVOC_base, eCO2_base;
@ -195,6 +195,7 @@ void loop() {
u8g2log.print("\n"); u8g2log.print("\n");
} }
delay(1000); //wait 1min
delay(60000);
} }