Error in Serial Printing

Dependencies:   mbed-rtos mbed

Committer:
adaveiitm
Date:
Wed Jun 25 06:57:18 2014 +0000
Revision:
0:c9a8a9f0e3b6
Hello World

Who changed what in which revision?

UserRevisionLine numberNew contents of line
adaveiitm 0:c9a8a9f0e3b6 1 /*Code to print simple Hello World statement with a timestamp */
adaveiitm 0:c9a8a9f0e3b6 2 #include "mbed.h"
adaveiitm 0:c9a8a9f0e3b6 3 Serial pc(USBTX,USBRX); //Include serial interface with pc
adaveiitm 0:c9a8a9f0e3b6 4 Timer t ; //Function to include the timestamp
adaveiitm 0:c9a8a9f0e3b6 5 int main(){
adaveiitm 0:c9a8a9f0e3b6 6 //wait(0.1);
adaveiitm 0:c9a8a9f0e3b6 7 t.start();
adaveiitm 0:c9a8a9f0e3b6 8 pc.printf("Hello World-----%f\n\r",t.read());
adaveiitm 0:c9a8a9f0e3b6 9 fflush(stdout); //In order to flush out buffer
adaveiitm 0:c9a8a9f0e3b6 10 t.stop();
adaveiitm 0:c9a8a9f0e3b6 11 }