huy le
/
Nucleo_blink_led
Blink led and show status on UART
main.cpp
- Committer:
- huyle
- Date:
- 2016-01-19
- Revision:
- 4:fd6be3032e56
- Parent:
- 2:b60cb847489c
File content as of revision 4:fd6be3032e56:
/********************************************************************************** * @file main.cpp * @author HuyLe <anhhuy@live.com> * @version V0.1 * @date 19-Jan-2016 * @brief Nucleo UART example ***********************************************************************************/ #include "mbed.h" Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myled(LED1); int main() { //pc.baud(9600); int i = 1; pc.printf("\t :::::Testing UART Dislay:::::\r\n"); pc.printf("\t Configure Tera Term: 9600 bauds, 8-bit data, \ no parity, 1 stop bit.\r\n"); while(1) { pc.printf("\t => Counts: %d \r\n", i++); myled = 1; pc.printf("\t LED is ON\r"); wait(3.0); myled = 0; pc.printf("\t LED is OFF\r"); wait(3.0); } }