for SEEED Arch LINK

Dependencies:   mbed

Fork of mbed_blinky by Mbed

Files at this revision

API Documentation at this revision

Comitter:
wbqaston
Date:
Thu Dec 29 02:14:59 2016 +0000
Parent:
14:981d248a8057
Commit message:
fg

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Oct 28 03:18:15 2016 +0000
+++ b/main.cpp	Thu Dec 29 02:14:59 2016 +0000
@@ -1,12 +1,23 @@
 #include "mbed.h"
 
 DigitalOut myled(LED1);
+unsigned int sec=0,min,hour;
 
-int main() {
-    while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
+int add(void);
+
+int main() 
+{
+    while(1)
+     {
+        wait(1);
+        myled = !myled;
+        sec = sec+2;
+        
+            if(sec==60)
+            {
+                sec = 0;
+            }
+        
+        printf("sec = %d \n",sec);
     }
 }