The default Hello World program, used when you create a new program

Dependencies:   mbed-dev

Fork of HelloWorld by Simon Ford

main.cpp

Committer:
hankzhang
Date:
2018-07-26
Revision:
2:abda46270aa2
Parent:
0:fb6bbc10ffa0

File content as of revision 2:abda46270aa2:

#include "mbed.h"

DigitalOut myled(LED1);
 
Serial pc(USBTX, USBRX);
 


int main() {
    pc.baud(115200);
    pc.printf("Hello World\n");
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}