dd

Dependencies:   mbed

Fork of STMNucleoF401RE_ExampleCode_02_BlinkLED_ by Corso Rapid Prototyping with STM32Nucleo

main.cpp

Committer:
fabiotonoli
Date:
2017-01-13
Revision:
3:9d4a3d3b95b9
Parent:
2:1ab0a73dd25b

File content as of revision 3:9d4a3d3b95b9:

/****************************************************
*            FAST PROTOTYPING WITH NUCLEO           *
* Example Code 02: Blink Led                        *
* Author: Mauro D'Angelo                            *
* Organization: STMicroelectronics                  *  
*****************************************************/

#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.05); // Attende 200 ms
        myled = 0; // LED is OFF
        wait(0.05); // Attende 1 sec
    }
}