Skip to content

Commit

Permalink
Fixed Readme
Browse files Browse the repository at this point in the history
Initialization with a different timeserver had a missing ntpUDP

Added the default values for interval and offset to the comment of the
default constructor in the ReadMe
  • Loading branch information
Uli committed May 14, 2016
1 parent ac19e0d commit 85c4cac
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NTPClient
# NTPClient

[![Build Status](https://travis-ci.org/arduino-libraries/NTPClient.svg?branch=master)](https://travis-ci.org/arduino-libraries/NTPClient)

Expand All @@ -17,12 +17,13 @@ const char *password = "<PASSWORD>";

WiFiUDP ntpUDP;

// By default 'time.nist.gov' is used.
// By default 'time.nist.gov' is used with 60 seconds update interval and
// no offset
NTPClient timeClient(ntpUDP);

// You can specify the time server pool and the offset, (in seconds)
// additionaly you can specify the update interval (in milliseconds).
// NTPClient timeClient("europe.pool.ntp.org", 3600, 60000);
// NTPClient timeClient(ntpUDP, "europe.pool.ntp.org", 3600, 60000);

void setup(){
Serial.begin(11520);
Expand All @@ -38,9 +39,9 @@ void setup(){

void loop() {
timeClient.update();

Serial.println(timeClient.getFormattedTime());

delay(1000);
}
```

0 comments on commit 85c4cac

Please sign in to comment.