Bryce Himebaugh
/
xdot-passthru
Test program to eventually talk to the xdot
Diff: main.cpp
- Revision:
- 0:4dd6ba25f7df
diff -r 000000000000 -r 4dd6ba25f7df main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 03 19:48:31 2018 +0000 @@ -0,0 +1,19 @@ +#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; + } + } +} \ No newline at end of file