Scrolls LEDs 1-4 On, and then Off

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
nullsub
Date:
Sun Oct 17 23:23:07 2010 +0000
Commit message:

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Oct 17 23:23:07 2010 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+#define WAIT_TIME 0.09
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+
+int main() {
+    while(1) {
+        led1 = 1;
+        wait(WAIT_TIME);
+        led2 = led1;
+        wait(WAIT_TIME);
+        led3 = led1;
+        wait(WAIT_TIME);
+        led4 = led1;
+        wait(WAIT_TIME);
+        led1 = 0;
+        wait(WAIT_TIME);
+        led2 = led1;
+        wait(WAIT_TIME);
+        led3 = led1;
+        wait(WAIT_TIME);
+        led4 = led1;
+        wait(WAIT_TIME);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Oct 17 23:23:07 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e