Hello,
I have tried to make a NTP clock based on the example code: https://www.arduino.cc/en/Tutorial/UdpNTPClient
I have Arduino Uno and WiFi shield. It looks to me that the WiFi shield connects to network well but I can't get packet from the time server.
I have added a short additional code to the loop section:
while(Udp.parsePacket()==0)
{
Serial.println("Waiting for packet");
delay(500);
}
The code can't go further. I understand that I don't get a packet.
From where I should start fault finding? Can my router prevent receiving packets?
What IP are you using for the NTP server? The Ip in the example won't work. Try one of these:
Non-authoritative answer:
Name: pool.ntp.org
Address: 216.182.1.2
Name: pool.ntp.org
Address: 69.89.207.199
Name: pool.ntp.org
Address: 72.14.183.239
Name: pool.ntp.org
Address: 132.163.4.102
Unfortunately none of these IP addresses worked either.
Which wifi shield are you using? There are a couple, and they use different libraries. A link to that hardware might help.
I am using Arduino WiFi shield: https://www.arduino.cc/en/Main/ArduinoWiFiShield
and the following libraries:
SPI.h
WiFi.h
WiFiUdp.h
Did you upgrade the firmware?
Now I have updated and it solved the problem - thank you!
Btw: updating the firmware was a painful project. It took about 3 hours. I found several instructions from the web but none worked well on my PC.