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.
main.cpp
- Committer:
- mikewebkist
- Date:
- 2014-09-04
- Revision:
- 1:47c61bf9c81e
- Parent:
- 0:aa0e1ad88af5
- Child:
- 2:fd6008aa85cd
File content as of revision 1:47c61bf9c81e:
#include "mbed.h" DigitalOut LED[] = {(P0_7), (P0_8), (P0_2), (P0_20), (P1_19), (P0_17), (P0_23)};// declare 7 LEDs float delayTime = .05; int main() { while(1) { if(delayTime > 0.5) { delayTime = 0.05; } for(int x=0; x<7; x++) { LED[x] = 1; wait(delayTime); LED[x] = 0; //wait(delayTime); } for(int x=5; x>0; x--) { LED[x] = 1; wait(delayTime); LED[x] = 0; //wait(delayTime); } delayTime = delayTime * 1.5; } }