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

Commit

Permalink
Added new onUpdate callback to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsharma82 committed Jul 1, 2020
1 parent db7ece7 commit 03e5810
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ void setup() {
Use this: EasyDDNS.client("domain", "username", "password");
*/
EasyDDNS.client("12345.duckdns.org", "token"); // Enter your DDNS Domain & Token
// Get Notified when your IP changes
EasyDDNS.onUpdate([&](const char* oldIP, const char* newIP){
Serial.print("EasyDDNS - IP Change Detected: ");
Serial.println(newIP);
});
}
void loop() {
Expand Down
6 changes: 6 additions & 0 deletions examples/DDNS_Client/DDNS_Client.ino
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ void setup() {
Use this: EasyDDNS.client("domain", "username", "password");
*/
EasyDDNS.client("12345.duckdns.org", "token"); // Enter your DDNS Domain & Token

// Get Notified when your IP changes
EasyDDNS.onUpdate([&](const char* oldIP, const char* newIP){
Serial.print("EasyDDNS - IP Change Detected: ");
Serial.println(newIP);
});
}

void loop() {
Expand Down
6 changes: 6 additions & 0 deletions examples/LocalIP_DDNS_Client/LocalIP_DDNS_Client.ino
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ void setup() {
Use this: EasyDDNS.client("domain", "username", "password");
*/
EasyDDNS.client("12345.duckdns.org", "token"); // Enter your DDNS Domain & Token

// Get Notified when your IP changes
EasyDDNS.onUpdate([&](const char* oldIP, const char* newIP){
Serial.print("EasyDDNS - IP Change Detected: ");
Serial.println(newIP);
});
}

void loop() {
Expand Down

0 comments on commit 03e5810

Please sign in to comment.