fork of Official_mBuino

Dependencies:   mbed

Fork of Official_mBuino by David Yeske

Revision:
0:c72235e68f52
Child:
1:f89a6b63eae7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Sep 13 03:20:40 2014 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+
+DigitalOut LED[] = {(LED1), (LED2), (LED3), (LED4), (LED5), (LED6), (LED7)};// declare 7 LEDs
+
+float delayTime = .05;
+
+int main()
+{
+    while(1)
+    {
+        delayTime = 0.05;
+        for(int x = 0; x < 7; x++)
+        {
+            LED[x] = 1; // turn on
+            wait(.2); // delay
+        
+            LED[x] = 0; // turn off
+            wait(delayTime); // delay
+        }
+        for(int x = 6; x >= 0; x--)
+        {
+            LED[x] = 1; // turn on
+            wait(.2); // delay
+        
+            LED[x] = 0; // turn off
+            wait(delayTime); // delay
+        }
+
+        for(int x = 0; x < 7; x++)
+        {
+            LED[x] = 1; // turn on
+            wait(delayTime); // delay
+        }
+        for(int x = 6; x >= 0; x--)
+        {
+            LED[x] = 0; // turn off
+            wait(delayTime); // delay
+        }
+        
+
+    }
+}