LPC1768_AppBoard_Internet_LCD_Clock

Dependencies:   C12832_lcd DNSResolver EthernetNetIf NTPClientMin mbed

Fork of Internet_LCD_Clock by jim hamblen

Files at this revision

API Documentation at this revision

Comitter:
joinamruta
Date:
Thu Feb 13 10:14:00 2014 +0000
Parent:
1:09fcc9b81f23
Child:
3:8d177b351165
Commit message:
Changed Name

Changed in this revision

C12832_lcd.lib Show annotated file Show diff for this revision Revisions of this file
DNSResolver.lib Show annotated file Show diff for this revision Revisions of this file
EthernetNetIf.lib Show annotated file Show diff for this revision Revisions of this file
Internet_LCD_Clock.cpp Show diff for this revision Revisions of this file
LPC1768_AppBoard_Internet_LCD_Clock.cpp Show annotated file Show diff for this revision Revisions of this file
NTPClient.lib Show diff for this revision Revisions of this file
NTPClientMin.lib Show annotated file Show diff for this revision Revisions of this file
TextLCD.lib Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832_lcd.lib	Thu Feb 13 10:14:00 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/dreschpe/code/C12832_lcd/#8f86576007d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DNSResolver.lib	Thu Feb 13 10:14:00 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/hlipka/code/DNSResolver/#097d4993dd1e
--- a/EthernetNetIf.lib	Sat Apr 14 01:12:23 2012 +0000
+++ b/EthernetNetIf.lib	Thu Feb 13 10:14:00 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/donatien/code/EthernetNetIf/#bc7df6da7589
+http://mbed.org/users/donatien/code/EthernetNetIf/#01cb5a40de7d
--- a/Internet_LCD_Clock.cpp	Sat Apr 14 01:12:23 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#include "mbed.h"
-#include "EthernetNetIf.h"
-#include "NTPClient.h"
-#include "TextLCD.h"
-// Internet of Things clock example: LCD time is set via internet NTP time server
-TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d0-d3
-EthernetNetIf eth;
-NTPClient ntp;
-
-int main() {
-//system time structure
-    time_t ctTime;
-    //clear LCD
-    lcd.cls();
-    // lcd.printf prints to LCD display;
-    lcd.printf("Get IP addr...");
-    EthernetErr ethErr = eth.setup();
-    //Get an Internet IP address using DHCP
-    if (ethErr) {
-        //error or timeout getting an IP address
-        lcd.cls();
-        lcd.printf("Network Error \n\r %d",ethErr);
-        return -1;
-    }
-    lcd.cls();
-    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);
-    lcd.printf("Time set");
-    //Delay for human time to read LCD display
-    wait(1);
-    while (1) {
-        // loop and periodically update the LCD's time display
-        lcd.cls();
-        ctTime = time(NULL);
-        lcd.printf("UTC:  %s", ctime(&ctTime));
-        wait(.25);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LPC1768_AppBoard_Internet_LCD_Clock.cpp	Thu Feb 13 10:14:00 2014 +0000
@@ -0,0 +1,48 @@
+#include "mbed.h"
+#include "EthernetNetIf.h"
+#include "NTPClient.h"
+#include "C12832_lcd.h"
+
+// Internet of Things clock example: LCD time is set via internet NTP time server
+
+EthernetNetIf eth;
+NTPClient ntp;
+C12832_LCD lcd;
+
+int main() {
+//system time structure
+    time_t ctTime;
+    //clear LCD
+    lcd.cls();
+    lcd.locate(0,0);
+    // lcd.printf prints to LCD display;
+    lcd.printf("Get IP addr...");
+    EthernetErr ethErr = eth.setup();
+    //Get an Internet IP address using DHCP
+    if (ethErr) {
+        //error or timeout getting an IP address
+        lcd.cls();
+        lcd.printf("Network Error \n\r %d",ethErr);
+        return -1;
+    }
+    lcd.cls();
+    lcd.locate(0,0);
+    lcd.printf("Reading Time...\n\r");
+    //specify time server URL
+    Host server(IpAddr(), 123, "0.us.pool.ntp.org");
+    //Read time from server
+    ntp.setTime(server);
+    lcd.cls();
+    lcd.locate(0,0);
+    lcd.printf("Time set");
+    //Delay for human time to read LCD display
+    wait(1);
+    while (1) {
+        // loop and periodically update the LCD's time display
+        lcd.cls();
+        lcd.locate(0,0);
+        ctTime = time(NULL);
+        lcd.printf("UTC:  %s", ctime(&ctTime));
+        wait(.25);
+    }
+}
--- a/NTPClient.lib	Sat Apr 14 01:12:23 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/donatien/code/NTPClient/#7c3f1199256a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NTPClientMin.lib	Thu Feb 13 10:14:00 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/hlipka/code/NTPClientMin/#63ded11b8fa2
--- a/TextLCD.lib	Sat Apr 14 01:12:23 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37