blink a led on pin PA_5 using the toggle function

Dependencies:   Hotboards_leds mbed

Fork of toggle by Roman Valencia

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 
00002 /*
00003  * The simplest program II, blink a led on pin PA_5
00004  * but this time using the toggle function
00005  * 
00006  */
00007  
00008 #include "mbed.h"
00009 #include "Hotboards_leds.h"
00010 
00011 //Creates a simple led object
00012 Hotboards_leds led( PA_5 );
00013 
00014 int main()
00015 {
00016     while(1)
00017     {
00018         //Toggles led
00019         led.toggle( );
00020         wait_ms( 300 );
00021     }
00022 }