Example program with the color LEDs of the mbed application shield

Dependencies:   mbed

main.cpp

Committer:
screamer
Date:
2014-03-17
Revision:
0:5befba8e183e
Child:
2:6cf5f4d0d948

File content as of revision 0:5befba8e183e:

#include "mbed.h"
 
DigitalOut led(LED1);
DigitalOut red(D5);
DigitalOut blue(D8);
DigitalOut green(D9);
int i;
 
int main()
{ 
    while(1) {
        for (i=1; i<7; i++) {
            green = i & 1;
            blue = i & 2;
            red = i & 4;
            led = led ? 0 : 1;
            wait(0.2);
        }
    }
}