Many LEDs.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
AkiraK
Date:
Thu Oct 11 15:43:55 2012 +0000
Commit message:
Sample2;

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 1cb4565d9dfe main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 11 15:43:55 2012 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+
+DigitalOut myled1(p5);
+DigitalOut myled2(p6);
+DigitalOut myled3(p7);
+DigitalOut myled4(p8);
+DigitalOut myled5(p9);
+DigitalOut myled6(p10);
+
+int main() {
+    while(1) {
+        myled1 = 1;
+        wait(0.2);
+        myled2 = 1;
+        wait(0.2);
+        myled3 = 1;
+        wait(0.2);
+        myled4 = 1;
+        wait(0.2);
+        myled5 = 1;
+        wait(0.2);
+        myled6 = 1;
+        wait(0.2);
+        myled6 = 0;
+        wait(0.2);
+        myled5 = 0;
+        wait(0.2);
+        myled4 = 0;
+        wait(0.2);
+        myled3 = 0;
+        wait(0.2);
+        myled2 = 0;
+        wait(0.2);
+        myled1 = 0;
+        wait(0.2);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 1cb4565d9dfe mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 11 15:43:55 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/cd19af002ccc
\ No newline at end of file