From fa53ddbc0fcf289e987cccdebc7c7efc3561beff Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Wed, 29 May 2024 20:31:47 +0700 Subject: [PATCH] report interval --- src/config.hpp | 1 + src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.hpp b/src/config.hpp index 49b9a58..aa3dc10 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -10,6 +10,7 @@ * Pin Definitions * ***********************************************/ #define TEMP_SENSOR_PIN 32 +#define TEMP_REPORT_INTERVAL_MS 5000 /*********************************************** * Display Configuration * diff --git a/src/main.cpp b/src/main.cpp index ed36e1b..92aed03 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -67,7 +67,7 @@ void setup() void loop() { static uint32_t lastTempUpdate = 0; - if (millis() - lastTempUpdate > 5000) + if (millis() - lastTempUpdate > TEMP_REPORT_INTERVAL_MS) { if(dht.read() != DHTLIB_OK) {