![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
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
mBuino blinky experiments.
Diff: main.cpp
- Revision:
- 1:47c61bf9c81e
- Parent:
- 0:aa0e1ad88af5
- Child:
- 2:fd6008aa85cd
--- a/main.cpp Mon Jul 14 19:09:55 2014 +0000 +++ b/main.cpp Thu Sep 04 11:20:33 2014 +0000 @@ -8,35 +8,25 @@ { while(1) { - delayTime = 0.05; - for(int x = 0; x < 7; x++) + if(delayTime > 0.5) { - LED[x] = 1; // turn on - wait(.2); // delay - - LED[x] = 0; // turn off - wait(delayTime); // delay + delayTime = 0.05; } - for(int x = 6; x >= 0; x--) + for(int x=0; x<7; x++) { - LED[x] = 1; // turn on - wait(.2); // delay - - LED[x] = 0; // turn off - wait(delayTime); // delay + LED[x] = 1; + wait(delayTime); + LED[x] = 0; + //wait(delayTime); } - - for(int x = 0; x < 7; x++) + for(int x=5; 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 + LED[x] = 1; + wait(delayTime); + LED[x] = 0; + //wait(delayTime); } - + delayTime = delayTime * 1.5; } }