Electornic dice application for mBuino platform

Dependencies:   mbed

Revision:
0:5d9ccbe9d49d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jul 23 19:02:43 2014 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+//#include "rtos.h"
+
+float delayTime = .05;
+
+DigitalOut LED[] = {(P0_7), (P0_8), (P0_2), (P0_20), (P1_19), (P0_17), (P0_23)};// declare 7 LEDs
+
+int main()
+{
+    int i = 0;
+    while( i < 10 ) {
+        for(int x = 0; x < 7; x++) {
+            LED[x] = 1; // turn on
+            wait(delayTime); // delay
+        }
+        for(int x = 0; x < 7; x++) {
+            LED[x] = 0; // turn off
+            wait(delayTime); // delay
+        }
+        for(int x = 6; x >= 0; x--) {
+            LED[x] = 1; // turn on
+            wait(delayTime); // delay
+        }
+        for(int x = 6; x >= 0; x--) {
+            LED[x] = 0; // turn off
+            wait(delayTime); // delay
+        }
+
+        i++;
+    }
+
+    //Thread::wait(osWaitForever);
+}