Brett Smith / Mbed 2 deprecated Nucleo_printf

Dependencies:   mbed

Committer:
brett
Date:
Wed Oct 30 00:27:37 2019 -0700
Revision:
1:792cb2614ee9
Parent:
0:a97acec6e904
Child:
2:41cc40bb6f51
Testing hg

Who changed what in which revision?

UserRevisionLine numberNew contents of line
brett_slab 0:a97acec6e904 1 #include "mbed.h"
brett_slab 0:a97acec6e904 2
brett_slab 0:a97acec6e904 3 #define PC_BAUD 115200
brett_slab 0:a97acec6e904 4
brett_slab 0:a97acec6e904 5 Serial pc(PA_10, PA_9); //TX, RX
brett_slab 0:a97acec6e904 6
brett_slab 0:a97acec6e904 7 DigitalOut myled(LED1);
brett_slab 0:a97acec6e904 8
brett_slab 0:a97acec6e904 9 int main()
brett_slab 0:a97acec6e904 10 {
brett_slab 0:a97acec6e904 11 int i = 1;
brett_slab 0:a97acec6e904 12 pc.printf("Hello World !\n");
brett_slab 0:a97acec6e904 13 pc.baud(PC_BAUD);
brett_slab 0:a97acec6e904 14 while(1) {
brett 1:792cb2614ee9 15 wait(0.5);
brett_slab 0:a97acec6e904 16 pc.printf("This program runs since %d seconds.\n", i++);
brett_slab 0:a97acec6e904 17 myled = !myled;
brett_slab 0:a97acec6e904 18 }
brett_slab 0:a97acec6e904 19 }