Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit 03e5810

Browse files
committed
Added new onUpdate callback to examples
1 parent db7ece7 commit 03e5810

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ void setup() {
107107
Use this: EasyDDNS.client("domain", "username", "password");
108108
*/
109109
EasyDDNS.client("12345.duckdns.org", "token"); // Enter your DDNS Domain & Token
110+
111+
// Get Notified when your IP changes
112+
EasyDDNS.onUpdate([&](const char* oldIP, const char* newIP){
113+
Serial.print("EasyDDNS - IP Change Detected: ");
114+
Serial.println(newIP);
115+
});
110116
}
111117
112118
void loop() {

examples/DDNS_Client/DDNS_Client.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ void setup() {
4646
Use this: EasyDDNS.client("domain", "username", "password");
4747
*/
4848
EasyDDNS.client("12345.duckdns.org", "token"); // Enter your DDNS Domain & Token
49+
50+
// Get Notified when your IP changes
51+
EasyDDNS.onUpdate([&](const char* oldIP, const char* newIP){
52+
Serial.print("EasyDDNS - IP Change Detected: ");
53+
Serial.println(newIP);
54+
});
4955
}
5056

5157
void loop() {

examples/LocalIP_DDNS_Client/LocalIP_DDNS_Client.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ void setup() {
5151
Use this: EasyDDNS.client("domain", "username", "password");
5252
*/
5353
EasyDDNS.client("12345.duckdns.org", "token"); // Enter your DDNS Domain & Token
54+
55+
// Get Notified when your IP changes
56+
EasyDDNS.onUpdate([&](const char* oldIP, const char* newIP){
57+
Serial.print("EasyDDNS - IP Change Detected: ");
58+
Serial.println(newIP);
59+
});
5460
}
5561

5662
void loop() {

0 commit comments

Comments
 (0)