led and serial test

Dependencies:   mbed

Committer:
shokai
Date:
Tue Mar 09 04:09:10 2010 +0000
Revision:
0:0a8e7b5922a8

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shokai 0:0a8e7b5922a8 1 #include "mbed.h"
shokai 0:0a8e7b5922a8 2
shokai 0:0a8e7b5922a8 3 Serial pc(USBTX, USBRX); // tx, rx
shokai 0:0a8e7b5922a8 4
shokai 0:0a8e7b5922a8 5 DigitalOut myled1(LED1);
shokai 0:0a8e7b5922a8 6 DigitalOut myled2(LED2);
shokai 0:0a8e7b5922a8 7
shokai 0:0a8e7b5922a8 8 int main() {
shokai 0:0a8e7b5922a8 9 while(1) {
shokai 0:0a8e7b5922a8 10 myled1 = 1;
shokai 0:0a8e7b5922a8 11 myled2 = 0;
shokai 0:0a8e7b5922a8 12 pc.printf("led 1 on\r\n");
shokai 0:0a8e7b5922a8 13 wait(0.5);
shokai 0:0a8e7b5922a8 14 myled1 = 0;
shokai 0:0a8e7b5922a8 15 myled2 = 1;
shokai 0:0a8e7b5922a8 16 pc.printf("led 2 on\r\n");
shokai 0:0a8e7b5922a8 17 wait(0.2);
shokai 0:0a8e7b5922a8 18 }
shokai 0:0a8e7b5922a8 19 }