led and serial test

Dependencies:   mbed

main.cpp

Committer:
shokai
Date:
2010-03-09
Revision:
0:0a8e7b5922a8

File content as of revision 0:0a8e7b5922a8:

#include "mbed.h"

Serial pc(USBTX, USBRX); // tx, rx

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

int main() {
    while(1) {
        myled1 = 1;
        myled2 = 0;
        pc.printf("led 1 on\r\n");
        wait(0.5);
        myled1 = 0;
        myled2 = 1;
        pc.printf("led 2 on\r\n");
        wait(0.2);
    }
}