Return and new line

Dependencies:   mbed

Committer:
bcostm
Date:
Fri Jul 07 06:52:15 2017 +0000
Revision:
0:0ee4748f4c5c
Child:
1:ce08f1d8140c
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:0ee4748f4c5c 1 #include "mbed.h"
bcostm 0:0ee4748f4c5c 2
bcostm 0:0ee4748f4c5c 3 //------------------------------------------------------------------------------
bcostm 0:0ee4748f4c5c 4 // Before using this example, ensure that you an hyperterminal installed on your
bcostm 0:0ee4748f4c5c 5 // computer. More info here: https://developer.mbed.org/handbook/Terminals
bcostm 0:0ee4748f4c5c 6 //
bcostm 0:0ee4748f4c5c 7 // Hyperterminal default configuration:
bcostm 0:0ee4748f4c5c 8 // 9600 bauds, 8-bit data, no parity
bcostm 0:0ee4748f4c5c 9 //------------------------------------------------------------------------------
bcostm 0:0ee4748f4c5c 10
bcostm 0:0ee4748f4c5c 11 DigitalOut led(LED1);
bcostm 0:0ee4748f4c5c 12
bcostm 0:0ee4748f4c5c 13 int main()
bcostm 0:0ee4748f4c5c 14 {
bcostm 0:0ee4748f4c5c 15 int i = 1;
bcostm 0:0ee4748f4c5c 16
bcostm 0:0ee4748f4c5c 17 printf("Hello World !\n");
bcostm 0:0ee4748f4c5c 18
bcostm 0:0ee4748f4c5c 19 while(1) {
bcostm 0:0ee4748f4c5c 20 wait(1); // 1 second
bcostm 0:0ee4748f4c5c 21 led = !led; // Toggle LED
bcostm 0:0ee4748f4c5c 22 printf("This program runs since %d seconds.\n", i++);
bcostm 0:0ee4748f4c5c 23 }
bcostm 0:0ee4748f4c5c 24 }