Nucleo blink led Example

Dependencies:   mbed

main.cpp

Committer:
anoney180133
Date:
2015-12-11
Revision:
0:71b9cf873af6

File content as of revision 0:71b9cf873af6:

#include "mbed.h"

DigitalOut Nucleo_GREEN_LED(LED1);
DigitalOut LED(PA_8,0);

int main() 
{
    while(1) 
    {
        Nucleo_GREEN_LED = 1; // LED is ON
        LED.write(1);
        wait(0.5); // 500 ms
        Nucleo_GREEN_LED = 0; // LED is OFF
        LED.write(0);
        wait(0.5); // 500 ms
    }
}