Return and new line

Dependencies:   mbed

main.cpp

Committer:
bcostm
Date:
2017-07-07
Revision:
0:0ee4748f4c5c
Child:
1:ce08f1d8140c

File content as of revision 0:0ee4748f4c5c:

#include "mbed.h"

//------------------------------------------------------------------------------
// Before using this example, ensure that you an hyperterminal installed on your
// computer. More info here: https://developer.mbed.org/handbook/Terminals
//
// Hyperterminal default configuration:
// 9600 bauds, 8-bit data, no parity
//------------------------------------------------------------------------------

DigitalOut led(LED1);

int main()
{
    int i = 1;

    printf("Hello World !\n");

    while(1) {
        wait(1); // 1 second
        led = !led; // Toggle LED
        printf("This program runs since %d seconds.\n", i++);
    }
}