Misure su Sistemi Wireless / Mbed 2 deprecated BlinkLED_02

Dependencies:   mbed

Fork of STMNucleoF401RE_ExampleCode_02_BlinkLED_ by 20161020-Corso Rapid Prototyping with STM32Nucleo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /****************************************************
00002 *            FAST PROTOTYPING WITH NUCLEO           *
00003 * Example Code 02: Blink Led                        *
00004 * Author: Francesco Bonavolonta                     *
00005 * Organization: Unina                               *  
00006 *****************************************************/
00007 
00008 #include "mbed.h"
00009 
00010 //Instanzia una classe di tipo DigitalOut. L'instanza avra' nome myled e le viene assegnato il pin LED1
00011 DigitalOut myled(LED1);
00012 
00013 // Entry point
00014 int main() {
00015     // Il Led lampeggia
00016     while(1) {
00017         myled = 1; // LED is ON
00018         wait(0.2); // Attende 200 ms
00019         myled = 0; // LED is OFF
00020         wait(1.0); // Attende 1 sec
00021     }
00022 }