blinks RGB LED

Dependencies:   mbed

Fork of mbed_blinky by Mbed

main.cpp

Committer:
musashiaharon
Date:
2014-11-04
Revision:
7:b3b4f46bd696
Parent:
4:81cea7a352b0

File content as of revision 7:b3b4f46bd696:

#include "mbed.h"

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

int main() {
    rled = 1; // turn off the red LED
    gled = 1; // green off
    while(1) {
        bled = 1; // blue off
        wait(0.2);
        bled = 0; // blue on
        wait(0.2);
    }
}