turning a led ON and OFF
Dependencies: Hotboards_leds mbed
Diff: main.cpp
- Revision:
- 0:b5cfc5f155cb
- Child:
- 1:624cca427a70
diff -r 000000000000 -r b5cfc5f155cb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Feb 29 19:58:35 2016 +0000 @@ -0,0 +1,24 @@ + +/* + * The simplest program I, blink a led on pin PA_5 + * + */ + +#include "mbed.h" +#include "Hotboards_leds.h" + +//Creates a simple led object +Hotboards_leds led( PA_5 ); + +int main() +{ + while(1) + { + //Turns ON led + led.turnOn( ); + wait_ms( 100 ); + //Turns OFF led + led.turnOff( ); + wait_ms( 100 ); + } +}