The simplest program , blink a led on pin PA_5

Dependencies:   Hotboards_leds mbed

Fork of led by Roman Valencia

main.cpp

Committer:
Hotboards
Date:
2016-03-15
Revision:
1:87da85491aaa
Parent:
0:b5cfc5f155cb

File content as of revision 1:87da85491aaa:


/* 
 * file        Hotboards_leds.cpp
 * autor       Diego 
 * modified by Roman
 * contact     hotboards.org
 *
 * Description
 * The simplest program I, blink a led on pin PA_5
 * This sketch show how to use the Hotboards_leds library 
 * for toggling a led
 */
 
#include "mbed.h"
#include "Hotboards_leds.h"

//Creates a simple led object
Hotboards_leds led( PA_5 );

int main()
{
    while(1)
    {
        //Turns ON led
        led.turnOn( );
        wait_ms( 100 );
        //Turns OFF led
        led.turnOff( );
        wait_ms( 100 );
    }
}