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:
9:7ae675372031
Parent:
8:41a5757f3bb9
Child:
10:8a901b6d8cfa
--- a/main.cpp	Sat Sep 06 01:15:22 2014 +0000
+++ b/main.cpp	Sat Sep 06 02:44:07 2014 +0000
@@ -38,6 +38,28 @@
         }
 }
 
+void multiSweepMode(float delayTime)
+{
+        for(int w=1; w<13; w++)
+        {            
+            for(int x=1-w; x<13; x++)
+            {
+                    for(int z=0; z<w; z++) {
+                        if(x+z>=0 && x+z < 7) {
+                            LED[x+z]=1;
+                        }
+                    }
+                    wait(delayTime);
+                    for(int z=0; z<w; z++) {
+                        if(x+z>=0 && x+z < 7) {
+                            LED[x+z]=0;
+                        }
+                    }
+                
+            }
+        }
+}
+
 void pileMode(float delayTime)
 {
         for(int x=0; x<7; x++)
@@ -114,6 +136,7 @@
         bounceMode(0.05);
         sweep(0.05);
         pileMode(0.05);
-        // bounceMode(0.1);
+        sweep(0.05);
+        multiSweepMode(0.05);
     }
 }