Serial Hello World

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002  
00003 Serial pc(USBTX, USBRX); // tx, rx
00004  
00005 int main() {
00006     pc.printf("Hello World!\n");
00007     while(1) {
00008         pc.putc(pc.getc() + 1);
00009     }
00010 }