-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Json timezone support with MYCILA_NTP_JSON_SUPPORT
- Loading branch information
1 parent
762b6c1
commit 0c5a220
Showing
5 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <MycilaNTP.h> | ||
|
||
#include <HardwareSerial.h> | ||
#include <WiFi.h> | ||
|
||
#include <ArduinoJson.h> | ||
|
||
void setup() { | ||
Serial.begin(115200); | ||
while (!Serial) | ||
continue; | ||
|
||
uint32_t start = ESP.getFreeHeap(); | ||
|
||
JsonDocument doc; | ||
Mycila::NTP.timezonesToJson(doc.to<JsonObject>()); | ||
serializeJsonPretty(doc, Serial); | ||
Serial.println(); | ||
|
||
Serial.print("Heap used: "); | ||
Serial.print(start - ESP.getFreeHeap()); | ||
Serial.println(" bytes"); | ||
} | ||
|
||
void loop() { | ||
delay(1000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters