Slightly different message and adds \r to the printf for terminal programs like screen /dev/ttyACM0 which don't add <CR> automatically.

Dependencies:   mbed

main.cpp

Committer:
ChuckMcM
Date:
2014-11-16
Revision:
2:a361a088704a
Parent:
1:e9d1c42a73ae

File content as of revision 2:a361a088704a:

#include "mbed.h"

//------------------------------------
// Hyperterminal configuration
// 9600 bauds, 8-bit data, no parity
//------------------------------------

Serial pc(SERIAL_TX, SERIAL_RX);
 
DigitalOut myled(LED1);
 
int main() {
  int i = 1;
  pc.printf("Hello World !\r\n");
  while(1) { 
      wait(1);
      pc.printf("This has been running for %d seconds.\r\n", i++);
      myled = !myled;
  }
}