LCD clock display set using NTP server

Dependencies:   EthernetNetIf NTPClient_NetServices TextLCD mbed

Fork of Internet_LCD_Clock by jim hamblen

Files at this revision

API Documentation at this revision

Comitter:
4180_1
Date:
Sat Apr 14 01:12:23 2012 +0000
Parent:
0:5c5226aac712
Child:
2:cf35fcda83d0
Commit message:

Changed in this revision

Internet_LCD_Clock.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Internet_LCD_Clock.cpp	Thu Apr 12 01:44:02 2012 +0000
+++ b/Internet_LCD_Clock.cpp	Sat Apr 14 01:12:23 2012 +0000
@@ -18,19 +18,16 @@
     //Get an Internet IP address using DHCP
     if (ethErr) {
         //error or timeout getting an IP address
-        printf("Error %d in setup.\n\r", ethErr);
         lcd.cls();
         lcd.printf("Network Error \n\r %d",ethErr);
         return -1;
     }
     lcd.cls();
-    ctTime = time(NULL);
     lcd.printf("Reading Time...\n\r");
     //specify time server URL
     Host server(IpAddr(), 123, "0.uk.pool.ntp.org");
     //Read time from server
     ntp.setTime(server);
-    ctTime = time(NULL);
     lcd.printf("Time set");
     //Delay for human time to read LCD display
     wait(1);