Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ogata_lab
Date:
Wed May 29 02:07:33 2013 +0000
Commit message:
Ogata Laboratory Education Program No.1

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	Wed May 29 02:07:33 2013 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+DigitalOut leds[4] = {LED1, LED2, LED3, LED4};
+
+int main() {
+    while(1) {
+        // Turn on LEDs sequentially.S
+        for (int i = 0;i < 4;i++) {
+            leds[i] = 1;
+            wait(0.5);
+        }
+        // Turn off LEDs.
+        for (int i = 0;i < 4;i++) {
+            leds[3-i] = 0;
+            wait(0.5);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed May 29 02:07:33 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file