Example code 02
Dependencies: mbed
Fork of STMNucleoF401RE_ExampleCode_02_BlinkLED_ by
Diff: main.cpp
- Revision:
- 0:7d5534bf57c3
- Child:
- 2:1ab0a73dd25b
diff -r 000000000000 -r 7d5534bf57c3 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Oct 28 15:01:29 2015 +0000 @@ -0,0 +1,22 @@ +/**************************************************** +* FAST PROTOTYPING WITH NUCLEO * +* Example Code 02: Blink Led * +* Author: Mauro D'Angelo * +* Organization: Perlatecnica no-profit organization * +*****************************************************/ + +#include "mbed.h" + +//Instanzia una classe di tipo DigitalOut. L'instanza avra' nome myled e le viene assegnato il pin LED1 +DigitalOut myled(LED1); + +// Entry point +int main() { + // Il Led lampeggia + while(1) { + myled = 1; // LED is ON + wait(0.2); // Attende 200 ms + myled = 0; // LED is OFF + wait(1.0); // Attende 1 sec + } +}