9.3 Licht zeitgesteuert Ein- und Ausschalten, z.B. h:m:45 Ein, h:m:50 Aus.

Dependencies:   EthernetInterface NTPClient mbed-rtos mbed

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

Revision:
3:ca2a69bdba22
Parent:
2:c56233cb8520
Child:
4:35afb6a34591
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