led test fork

Dependencies:   mbed

Fork of mbed_blinky by krishna kumar

Files at this revision

API Documentation at this revision

Comitter:
krishna54504
Date:
Fri Mar 11 04:20:39 2016 +0000
Parent:
0:87f47f8a67a8
Commit message:
new blinking pattern

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 87f47f8a67a8 -r 967bb8e8290a main.cpp
--- a/main.cpp	Fri Mar 11 04:12:02 2016 +0000
+++ b/main.cpp	Fri Mar 11 04:20:39 2016 +0000
@@ -2,11 +2,15 @@
 
 DigitalOut myled(LED1);
 
-int main() {
+int main() 
+
+{
+ int i=0;
     while(1) {
-        myled = 1;
-        wait(0.2);
+        myled = i &1;
+        wait(0.25);
         myled = 0;
         wait(0.2);
+        i++;
     }
 }