Blink LED and printf test with Nucleo-F103RB

Dependencies:   mbed

This is a mbed board image. /media/uploads/kzl108/mbed_nucleo-f103rb.png

Hello World message was printed in Terminals. /media/uploads/kzl108/nucleo_printf.png

Committer:
kzl108
Date:
Tue May 12 03:25:02 2015 +0000
Revision:
0:777d783a9104
Blink LED and Printf from Nucleo-F103RB

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kzl108 0:777d783a9104 1 #include "mbed.h"
kzl108 0:777d783a9104 2
kzl108 0:777d783a9104 3 DigitalOut myled(LED1);
kzl108 0:777d783a9104 4
kzl108 0:777d783a9104 5 int main() {
kzl108 0:777d783a9104 6 while(1) {
kzl108 0:777d783a9104 7 printf("Hello World from Nucleo-F103RB!\n");
kzl108 0:777d783a9104 8 myled = 1; // LED is ON
kzl108 0:777d783a9104 9 wait(0.2); // 200 ms
kzl108 0:777d783a9104 10 myled = 0; // LED is OFF
kzl108 0:777d783a9104 11 wait(1.0); // 1 sec
kzl108 0:777d783a9104 12 }
kzl108 0:777d783a9104 13 }