A blinky variation for the mBuino with a bunch of different blink modes, deep-sleeping between iterations.

Dependencies:   Crypto RNG mbed WakeUp

Fork of mBuinoBlinky by Aron Phillips

mBuino blinky experiments.

Revision:
3:f3e484ae4439
Parent:
2:fd6008aa85cd
Child:
4:eea1a71b9a11
--- a/main.cpp	Fri Sep 05 01:34:02 2014 +0000
+++ b/main.cpp	Fri Sep 05 01:49:07 2014 +0000
@@ -24,10 +24,22 @@
             wait(delayTime);
         }
         
-        for(int x=0; x<20; x++) {
+        for(int n=0; n<128; n++) {
+            for(int b=0; b<7; b++) {
+                if(n & (1 << b)) {
+                    LED[6 - b]=1;
+                }
+            }
+            wait(0.05);
+            for(int b=0; b<7; b++) {
+                LED[b]=0;
+            }
+        }
+        
+        for(int x=0; x<32; x++) {
             rndLED = (int) RNG.getByte() % 8;
             LED[rndLED]=1;
-            wait(0.2);
+            wait(0.1);
             LED[rndLED]=0;
         }
     }