Test program to eventually talk to the xdot

Dependencies:   ATParser mbed

main.cpp

Committer:
bhimebau
Date:
2018-04-03
Revision:
0:4dd6ba25f7df

File content as of revision 0:4dd6ba25f7df:

#include "mbed.h"
Serial pc(SERIAL_TX, SERIAL_RX, 115200);
Serial device(PA_9, PA_10, 115200);  // tx, rx

DigitalOut myled(LED1);
 
int main() {    
    pc.putc('a');
    while(1) {
        if(pc.readable()) {
            device.putc(pc.getc());
            myled = !myled;
        }
        if(device.readable()) {
            pc.putc(device.getc());
            myled = !myled;
        }
    }
}