Serial Hello World

Fork of Serial_HelloWorld_Mbed by Mbed

Note

For simple debug statements over the USB UART channel you can just call printf and it will be automatically redirected to the terminal over USB.

API

API summary

Import librarymbed

No documentation found.

main.cpp

Committer:
mbed_official
Date:
2013-02-12
Revision:
0:879aa9d0247b
Child:
1:560b8ced44df

File content as of revision 0:879aa9d0247b:

#include "mbed.h"
 
Serial pc(USBTX, USBRX); // tx, rx
 
int main() {
    pc.printf("Hello World!\n");
    while(1) {
        pc.putc(pc.getc() + 1);
    }
}