jin young sung / Mbed 2 deprecated Led Clock Download Featured

Dependencies:   mbed

Revision:
6:276d384f8483
Parent:
5:2ead41027963
Child:
7:11a20cba4eae
diff -r 2ead41027963 -r 276d384f8483 main.cpp
--- a/main.cpp	Fri Apr 03 14:11:53 2015 +0000
+++ b/main.cpp	Mon May 18 14:49:08 2015 +0000
@@ -1,9 +1,9 @@
 #include "mbed.h"
 
 /*****************************************************************************
-*                                                                            *
-*                                                                            *
-*                                                                            *
+******************************************************************************
+******************************************************************************
+******************************************************************************
 ******************************************************************************/
 
 DigitalOut myled(LED1);
@@ -11,9 +11,13 @@
 DigitalOut dot_Point();      //Time point
 BusOut hour();               //Hour hand
 BusOut minute();             //Minute hand
+BusOut 
 InterruptIn hall();          //Hall sensor sensing interrupt
 
-void sensing()
+void hour_hand(void);
+void minute_hand(void);
+
+void sensor()
 {
     
     
@@ -21,10 +25,27 @@
 
 int main() 
 {
-    hall.rise(&sensing);      //rising edge operating
+    hall.rise(&sensor);      //rising edge operating
     
     while(1)
     {    
-    
+        frame = 1;
+        hour_hand();
+        minute_hand();
     }
+}
+
+void hour_hand(void)
+{
+     hour = 0x1F;
+     wait ();
+     hour = 0x00;
+     wait ();
+}
+void minute_hand(void)
+{
+     minute = 0x0FF;
+     wait ();
+     minute = 0x00;
+     wait();
 }
\ No newline at end of file