This program test's the serial communication (RS232) for GR-PEACH board at 9600 baud rate. It echo’s the character back on screen for testing the transmit and receive modes.
Diff: main.cpp
- Revision:
- 0:56614af10008
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Sep 27 05:22:57 2016 +0000 @@ -0,0 +1,12 @@ +//Echo back characters you type + +#include "mbed.h" + +Serial pc(USBTX, USBRX); + +int main() { + pc.printf("Echoes back to the screen anything you type\n"); + while(1) { + pc.putc(pc.getc()); + } +}