Simple LED blinking test code

main.cpp

Committer:
bpd227
Date:
2018-06-29
Revision:
0:903ffe4d4440

File content as of revision 0:903ffe4d4440:

#include "mbed.h"

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

// main() runs in its own thread in the OS
int main() {
    while (true) {
        led2 = led1;
        led1 = !led1;
        wait(0.5);
    }
}