Mbed Clock application using an NTP connection to get internet time and a terminal interface to send commands

Dependencies:   4DGL-uLCD-SE EthernetInterface NTPClient mbed-rtos mbed SDFileSystem wavfile

Revision:
0:4e6ae21cbd31
Child:
2:c939d0501184
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Clock.h	Tue Dec 02 17:22:43 2014 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+#include "NTPClient.h"
+
+// AM/PM
+const int AM = 0;
+const int PM = 12;
+
+// Timezones
+const int PST = -8;
+const int MST = -7;
+const int CST = -6;
+const int EST = -5;
+const int UTC = 0;
+
+class Clock {
+public:
+    Clock();
+    
+    void setTime(int hour, int minute, int period);
+    void setTimezone(int timezone);
+    
+    int syncTime();
+    
+    time_t getTime();
+    int getTimezone();
+private:
+    int timezone;    
+    
+    static bool isSet;
+};