I'm wanting to provide Date / Time to a Uno without using a RTC by downloading from a NTP site.
Under examples there is the Udp NTP Client but I'm getting a lot of errors when trying to compile due to missing library files etc.
From Google & Forum searches it looks like this code dates back to 2009/10 so I'm wondering if this has been updates since then or more specifically are other members having errors running under Arduino 1.0.6.
I use it and it works fine. It won't work if you have a SD card in the shield's slot tho. You must disable the SD SPI slave select before starting the ethernet service.
void setup() {
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
// rest of your setup code
If you have run that sketch without disabling the SD SPI, you must power down the Arduino for a few seconds before trying it again. That will free up the SD MISO line on the SD card.
edit: Insure you are using a current NTP server. I use nslookup to resolve "pool.ntp.org" to get a current server IP.
rbright:
Under examples there is the Udp NTP Client but I'm getting a lot of errors when trying to compile due to missing library files etc.
I have Arduino 1.0.5 installed and the example compiles fine for an Arduino UNO. Are you using an UNO or some other board? Have you tried re-installing Arduino?