blinks RGB LED

Dependencies:   mbed

Fork of mbed_blinky by Mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut rled(LED1);
00004 DigitalOut gled(LED2);
00005 DigitalOut bled(LED3);
00006 
00007 int main() {
00008     rled = 1; // turn off the red LED
00009     gled = 1; // green off
00010     while(1) {
00011         bled = 1; // blue off
00012         wait(0.2);
00013         bled = 0; // blue on
00014         wait(0.2);
00015     }
00016 }