Example code 02

Dependencies:   mbed

Fork of STMNucleoF401RE_ExampleCode_02_BlinkLED_ by 20161020-Corso Rapid Prototyping with STM32Nucleo

main.cpp

Committer:
perlatecnica
Date:
2015-10-28
Revision:
0:7d5534bf57c3
Child:
2:1ab0a73dd25b

File content as of revision 0:7d5534bf57c3:

/****************************************************
*            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
    }
}