report interval

This commit is contained in:
Siwat Sirichai 2024-05-29 20:31:47 +07:00
parent 9bc3fc5910
commit fa53ddbc0f
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@
* Pin Definitions * * Pin Definitions *
***********************************************/ ***********************************************/
#define TEMP_SENSOR_PIN 32 #define TEMP_SENSOR_PIN 32
#define TEMP_REPORT_INTERVAL_MS 5000
/*********************************************** /***********************************************
* Display Configuration * * Display Configuration *

View File

@ -67,7 +67,7 @@ void setup()
void loop() void loop()
{ {
static uint32_t lastTempUpdate = 0; static uint32_t lastTempUpdate = 0;
if (millis() - lastTempUpdate > 5000) if (millis() - lastTempUpdate > TEMP_REPORT_INTERVAL_MS)
{ {
if(dht.read() != DHTLIB_OK) if(dht.read() != DHTLIB_OK)
{ {