example serial

Dependencies:   mbed

Fork of mDot_Serial_Example by MultiTech

main.cpp

Committer:
mfiore
Date:
2015-10-02
Revision:
1:d2ee7143632f
Parent:
0:d88fbcdff4fb
Child:
2:d98cfa3851de

File content as of revision 1:d2ee7143632f:

/** mDot Serial Example Program
 *
 * This program demonstrates how to do handle a serial port
 * using the MultiTech mDot and MultiTech UDK2 hardware.
 *
 * This program echos characters on the debug serial port.
 * The debug serial port is operated at the default baud, 9600.
 * Connect your terminal application to the appropriate COM/tty
 * port on your PC. See https://developer.mbed.org/handbook/SerialPC
 * for details.
 */
 
#include "mbed.h"
 
int main() {
    Serial pc(USBTX, USBRX);
    
    while (true)
        if (pc.readable())
            pc.putc(pc.getc());
}