Madhura Tapse
/
STM32_Serial_CAN
Example code
Diff: main.cpp
- Revision:
- 0:0ee4748f4c5c
- Child:
- 1:ce08f1d8140c
diff -r 000000000000 -r 0ee4748f4c5c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Jul 07 06:52:15 2017 +0000 @@ -0,0 +1,24 @@ +#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++); + } +}