Turn on the 3 colors of the included RGB Led

Dependencies:   mbed

This program uses on board RGB Led.

main.cpp

Committer:
gcarmonar
Date:
2013-10-09
Revision:
0:0107f764ccc6

File content as of revision 0:0107f764ccc6:

#include "mbed.h"

DigitalOut bled(LED1);
DigitalOut gled(LED2);
DigitalOut rled(LED3);

int main() {
    // Apago los leds
    bled = 1;
    gled = 1;
    rled = 1;
    
    while(1) {
        bled = 0;  // Prendo Azul
        wait(1);
        bled = 1;
        rled = 0;  // Prendo Rojo
        wait(1);
        rled = 1;
        gled = 0;  // Prendo Verde
        wait(1);
        gled = 1;
    }
}