LED test fork

Dependencies:   mbed

Fork of led_test by Der Praktikant

Files at this revision

API Documentation at this revision

Comitter:
Praktikant
Date:
Fri Apr 08 13:30:45 2016 +0000
Parent:
1:1d60dc3c3b08
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 1d60dc3c3b08 -r e0a2da2e3ce7 main.cpp
--- a/main.cpp	Fri Apr 08 13:24:34 2016 +0000
+++ b/main.cpp	Fri Apr 08 13:30:45 2016 +0000
@@ -4,12 +4,11 @@
 DigitalOut myled2(LED2);
 
 int main() {
+    int i = 0;
     while(1) {
-        myled = 1; // LED is ON
-        myled2 = 0; 
-        wait(0.5); 
-        myled = 0; // LED is OFF
-        myled2 = 1; 
-        wait(0.5); // 1 sec
+        myled = i & 1; // LED is ON
+        myled2 = i & 2; 
+        wait(0.25); 
+        i++;
     }
 }