nobei anesa / Mbed 2 deprecated mbed_blink_test

Dependencies:   mbed

Fork of mbed_blinky_test by nobei anesa

Files at this revision

API Documentation at this revision

Comitter:
norbianisa
Date:
Thu Jul 23 02:21:09 2015 +0000
Parent:
1:82015014865c
Commit message:
new blinking pattern

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Jul 23 02:14:57 2015 +0000
+++ b/main.cpp	Thu Jul 23 02:21:09 2015 +0000
@@ -4,12 +4,11 @@
 DigitalOut myled2(LED2);
 
 int main() {
+    int i=0;
     while(1) {
-        myled = 1;
-        myled2 = 0;
-        wait(0.5);
-        myled = 0;
-        myled2 = 1;
-        wait(0.5);
+        myled = i & 1;
+        myled2 = i & 2;
+        wait(0.25);
+       i++;
     }
 }