led test

Dependencies:   mbed

main.cpp

Committer:
nexseed
Date:
2016-05-04
Revision:
0:cc00340e998c

File content as of revision 0:cc00340e998c:

#include "mbed.h"

DigitalOut myled1(LED1);
DigitalOut myled2(LED2);

int main() {
    while(1) {
        myled1 = 1; // LED is ON
        myled2 = 0;
        wait(0.2); // 200 ms
        myled1 = 0;
        myled2 = 1; // LED is ON
        myled2 = 0;
        wait(0.2); // 200 ms
    }
}