#include #include #include #include "ntp_client.h" byte mac[] = { 0x00, 0x04, 0x25 , 0x15, 0x48, 0x12 }; byte ip[] = { 10, 1, 1, 1 }; byte ntp_server[] = { 10, 1, 1, 254 }; void setup() { Ethernet.begin( mac, ip ); Serial.begin( 9600 ); } void loop() { unsigned long time_ntp; Serial.println( "Doing NTP sync..." ); // Poll the server with 4s timeout time_ntp = GetTimeFromNTPServer( ntp_server, 4 ); Serial.print( "Response : " ); Serial.println( time_ntp ); // Wait 10s delay( 10 * 1000 ); }