Rock Scofield / Mbed 2 deprecated Nucleo_printf

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 //------------------------------------
00004 // Hyperterminal configuration
00005 // 9600 bauds, 8-bit data, no parity
00006 //------------------------------------
00007 
00008 Serial pc(SERIAL_TX, SERIAL_RX);
00009 
00010 DigitalOut myled(LED1);
00011 
00012 int main()
00013 {
00014     int i = 1;
00015     pc.printf("Hello World !\n");
00016     while(1) {
00017         wait(1);
00018         pc.printf("This program runs since %d seconds.\n", i++);
00019         myled = !myled;
00020     }
00021 }