alex Garcia Blanco
/
mbed_LandTiger_LEDS
/*Simple program to exercise the LEDs * For the LandTiger Board
Diff: main.cpp
- Revision:
- 0:a2e3d8ae0a8c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Mar 12 01:20:44 2016 +0000 @@ -0,0 +1,18 @@ +/*Simple program to exercise the LEDs +* For the LandTiger Board +*/ + +#include "mbed.h" + +//Create a Bus with the 8 LEDS. Pins corresponds to LD4 to LD11 +BusOut LEDS(P2_7, P2_6, P2_5, P2_4, P2_3, P2_2, P2_1, P2_0); + +int main() { + while(1) { + //cycle the LEDS in bynary order + for(int i=0; i<=256; i++) { //8 bits + LEDS = i; //assign value to bus, turns on LEDS in hexa mode + wait(0.1); //timer of the LEDS sequence + } + } +}