Skip to content

Commit f55e1fc

Browse files
authored
Fix address of NTP server in example (#188)
For some reason the example failed to get a response from the IP address of `time.nist.gov`. I also didn't get a ping reply from that address to my laptop. I had more luck with one of the servers of `pool.ntp.org`. For the record I'm located in Amsterdam, Netherlands. Does this new address work in US and other parts of the world?
1 parent 1e922c5 commit f55e1fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/WiFiUdpNtpClient/WiFiUdpNtpClient.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ int keyIndex = 0; // your network key index number (needed only for W
2828

2929
unsigned int localPort = 2390; // local port to listen for UDP packets
3030

31-
IPAddress timeServer(129, 6, 15, 28); // time.nist.gov NTP server
31+
IPAddress timeServer(162, 159, 200, 123); // pool.ntp.org NTP server
3232

3333
const int NTP_PACKET_SIZE = 48; // NTP timestamp is in the first 48 bytes of the message
3434

35-
byte packetBuffer[ NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets
35+
byte packetBuffer[NTP_PACKET_SIZE]; //buffer to hold incoming and outgoing packets
3636

3737
// A UDP instance to let us send and receive packets over UDP
3838
WiFiUDP Udp;

0 commit comments

Comments
 (0)