Nicholas Outram / Mbed OS Task131
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 //Create an instance of a Serial object called pc
00004 //Transmit and receive pins have names USBTX and USBRX
00005 Serial pc(USBTX, USBRX);
00006 
00007 int main() {
00008 
00009     //Set the baud rate property (bits persecond)
00010     pc.baud(9600);
00011     
00012     //Call the printf method on pc
00013     pc.printf("Hello World\n");
00014 
00015     //Run in an infinite loop
00016     while(1) {
00017     }
00018 }