Extends 1 flashing blue LED light example to a 4 LED chaser sequence

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
liamg
Date:
Thu Jun 27 05:33:28 2013 +0000
Commit message:
Blue LED chaser sequence

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 2209c7d83a6f main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jun 27 05:33:28 2013 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "stdio.h"
+
+DigitalOut myled(LED1);
+DigitalOut myled2(LED2);
+DigitalOut myled3(LED3);
+DigitalOut myled4(LED4);
+
+int main() {
+    while(1) {
+        myled = 1;
+        wait(0.1);
+        myled = 0;
+        wait(0.1);
+        myled2 = 1;
+        wait(0.1);
+        myled2 = 0;
+        wait(0.1);
+        myled3 = 1;
+        wait(0.1);
+        myled3 = 0;
+        wait(0.1);
+        myled4 = 1;
+        wait(0.1);
+        myled4 = 0;
+        wait(0.2);
+    }
+    //printf("Ends \n");
+}
diff -r 000000000000 -r 2209c7d83a6f mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jun 27 05:33:28 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file