Charles Tritt
/
SerialEcho_UC
Echos ASCII message converted to uppercase. Uses toupper function from standard C library.
main.cpp
- Committer:
- CSTritt
- Date:
- 2017-05-16
- Revision:
- 0:2f9e67d4c561
- Child:
- 1:ea72a608382f
File content as of revision 0:2f9e67d4c561:
#include "mbed.h" //------------------------------------ // Tera Term configurations // Terminal - New-line, Receive LF, Transmit LF // Serial port - Data 8 bit, Parity none, Stop 1 bit data, Flow control none. // Baud as specified below. //------------------------------------ // Serial pc(SERIAL_TX, SERIAL_RX, 921600); // Highest Tera Term speed - works. Serial pc(USBTX, USBRX, 115200); // Highest common speed - works. // Serial pc(USBTX, USBRX); // Default 9600 baud, alternate pin names - works. DigitalOut myled(LED1); int main() { int i = 1; pc.printf("Hello World !\n"); while(1) { wait(1); pc.printf("This program runs since %d seconds.\n", i++); myled = !myled; } }