LED blinky

Dependencies:   mbed

main.cpp

Committer:
shrutimk
Date:
2015-02-10
Revision:
2:488f7e70d8b7
Parent:
1:4a71303b813e

File content as of revision 2:488f7e70d8b7:

#include "mbed.h"

DigitalOut led1(LED1);
DigitalOut led2(LED2);

int main()
{
    while (true) {
        led1 = 1; // toggle led
        led2 = 1;
        wait(0.5);
        led1 = 0;
        led2 = 0;
        wait(0.5);
    }
}