9.1 Holen der Zeit vom Internet und interne Uhr setzen

Dependencies:   EthernetInterface NTPClient mbed-rtos mbed

Fork of 09-02-Uebung by th.iotkit.ch

Files at this revision

API Documentation at this revision

Comitter:
stefan1691
Date:
Sun Feb 22 14:19:22 2015 +0000
Parent:
2:c56233cb8520
Commit message:
9.1 Holen der Zeit vom Internet und interne Uhr setzen

Changed in this revision

DigitDisplay.lib Show diff for this revision Revisions of this file
NTPClient.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r c56233cb8520 -r ca2a69bdba22 DigitDisplay.lib
--- a/DigitDisplay.lib	Sun Feb 22 14:15:58 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://developer.mbed.org/teams/Seeed/code/DigitDisplay/#d3173c8bfd48
diff -r c56233cb8520 -r ca2a69bdba22 NTPClient.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NTPClient.lib	Sun Feb 22 14:19:22 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/donatien/code/NTPClient/#881559865a93
diff -r c56233cb8520 -r ca2a69bdba22 main.cpp
--- a/main.cpp	Sun Feb 22 14:15:58 2015 +0000
+++ b/main.cpp	Sun Feb 22 14:19:22 2015 +0000
@@ -1,14 +1,12 @@
-/** 9.2 Holen der Zeit vom Internet, interne Uhr setzen und Ausgabe auf Display
+/** 9.1 Holen der Zeit vom Internet und interne Uhr setzen 
  * Informationen um Zeit zu holen von http://stackoverflow.com/questions/997946/how-to-get-current-time-and-date-in-c
 */
 #include "mbed.h"
 #include "EthernetInterface.h"
 #include "NTPClient.h"
-#include "DigitDisplay.h"
 
 EthernetInterface eth;
 NTPClient ntp;
-DigitDisplay display(PTC5, PTC7);
 
 int main()
 {
@@ -36,12 +34,6 @@
         time_t seconds = time(NULL);
         struct tm * now = localtime( & seconds );
         printf( "%d.%d.%d %2d:%2d:%2d\n", now->tm_mday, now->tm_mon + 1, now->tm_year + 1900, now->tm_hour, now->tm_min, now->tm_sec );
-
-        display.write(0, now->tm_min / 10);
-        display.write(1, now->tm_min % 10);
-        display.write(2, now->tm_sec  / 10);
-        display.write(3, now->tm_sec  % 10);
-
         wait(1);
     }
 }
\ No newline at end of file