A busy wait blinky implementation.

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut myled(LED1);
00004 
00005 int main() {
00006     while(1) {
00007         myled = 1;
00008         // printf("LED On\r\n");
00009         wait(0.2);
00010         myled = 0;
00011         // printf("LED Off \r\n");
00012         wait(0.2);
00013     }
00014 }