The example program for mbed pin-compatible platforms - Blink the LED's alternately.

Dependencies:   mbed mbed-src

Fork of mbed_blinky by Mbed

Committer:
mja054
Date:
Fri Jan 31 22:53:36 2014 +0000
Revision:
2:e73b698f2566
Parent:
1:f54cf65a063e
ASDF

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan 0:7dec7e9ac085 1 #include "mbed.h"
mja054 2:e73b698f2566 2 #include "rtos.h"
dan 0:7dec7e9ac085 3
mja054 1:f54cf65a063e 4 DigitalOut green(LED1);
mja054 1:f54cf65a063e 5 DigitalOut red(LED2);
dan 0:7dec7e9ac085 6
dan 0:7dec7e9ac085 7 int main() {
dan 0:7dec7e9ac085 8 while(1) {
mja054 1:f54cf65a063e 9 red = 1;
mja054 1:f54cf65a063e 10 green = 0;
dan 0:7dec7e9ac085 11 wait(0.2);
mja054 1:f54cf65a063e 12 red = 0;
mja054 1:f54cf65a063e 13 green = 1;
dan 0:7dec7e9ac085 14 wait(0.2);
dan 0:7dec7e9ac085 15 }
dan 0:7dec7e9ac085 16 }