led test fork

Dependencies:   mbed

Fork of NEWPRO by li yao

Files at this revision

API Documentation at this revision

Comitter:
yaoli
Date:
Wed Feb 05 10:51:09 2014 +0000
Parent:
1:fccc9a976a51
Commit message:
new binking pattern

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r fccc9a976a51 -r a37b541356b1 main.cpp
--- a/main.cpp	Wed Feb 05 10:45:47 2014 +0000
+++ b/main.cpp	Wed Feb 05 10:51:09 2014 +0000
@@ -4,11 +4,10 @@
 DigitalOut myled2(LED2);
 
 int main() {
+    int i = 0;
     while(1) {
-        myled = 1;
-        myled2 = 0;
-        wait(0.3);
-        myled2 = 1;
-        wait(0.5);
+        myled = i & 1;
+        myled2 = i & 2;
+        i++;
     }
 }