Rohan Gurav / Mbed OS Blinky_Led2
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut led2(LED2);
00004 DigitalOut led1(LED1);
00005 
00006 // main() runs in its own thread in the OS
00007 int main() 
00008 {
00009     led1 = 1;
00010     led2 = 0;
00011     
00012     while (true) 
00013     {
00014         led2 = !led2;
00015         led1 = !led1;
00016         wait(0.5);
00017     }
00018 }
00019