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.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 //Echo back characters you type
00002 
00003 #include "mbed.h"              
00004  
00005 Serial pc(USBTX, USBRX);
00006  
00007 int main() {
00008     pc.printf("Echoes back to the screen anything you type\n");
00009     while(1) {
00010         pc.putc(pc.getc());
00011     }
00012 }