![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Nucleo serial comm input output details
Diff: main.cpp
- Revision:
- 0:30ef5d9ef234
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Apr 20 10:32:26 2015 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" + +//------------------------------------ +// Hyperterminal configuration +// defau9600 bauds, 8-bit data, no parity + +//Arduino pin D0 & D1 is disconnected by default in nucleo board and hence serial O/P or I/P will not work. +// REFER ST USER MANUAL UM 1724 + +//O/P/ or I/P will work in ST link(USB to serial comm) or can also be used from CN3 connector of nucleo board. +//------------------------------------ + +Serial pc(SERIAL_TX, SERIAL_RX); + +DigitalOut myled(LED1); + +int main() { + int i = 1; + pc.printf("Hello World !\n"); + while(1) { + wait(0.8); + pc.printf("This program runs since %d seconds.\n", i++); + myled = !myled; + } +} + \ No newline at end of file