Electornic dice application for mBuino platform

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Architect
Date:
Wed Jul 23 19:02:43 2014 +0000
Commit message:
Initial version

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 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);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jul 23 19:02:43 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file