Skip to content

Commit 23af6c9

Browse files
committed
1 parent 53a4f72 commit 23af6c9

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

Weather_Station_ESP32_Single_SPI.ino

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,12 @@ const long debounceDelayMI = 200; // Debounce delay timing for metric imperial
169169
// Timer variables (check Open Weather).
170170

171171
unsigned long intervalTGetData = 0;
172-
const unsigned long intervalPGetData = 3600000; // Reset to 3600000 when finished with design (once per hour)
172+
const unsigned long intervalPGetData = 900000; // Reset to every 15 minutes
173+
174+
// Timer variables (update time).
175+
176+
unsigned long intervalUT = 0;
177+
const unsigned long intervalPUT = 60000; // Update every 1 minute
173178

174179
// Timer variables (check wifi).
175180

@@ -1444,6 +1449,16 @@ void loop() {
14441449

14451450
}
14461451

1452+
// Update time each minute.
1453+
1454+
if (millis() >= intervalUT + intervalPUT) {
1455+
1456+
printLocalTime();
1457+
1458+
intervalUT = millis();
1459+
1460+
}
1461+
14471462
// Check Open Weather at regular intervals (1 hour as free license is limited per day and month).
14481463

14491464
if (millis() >= intervalTGetData + intervalPGetData) {

__vm/Compile.vmps.xml

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

__vm/Upload.vmps.xml

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)