pass data from one serial port to another

  1. include "mbed.h"

Serial pc(USBTX, USBRX); tx, rx Serial device(p9, p10); tx, rx

int main() { while(1) { if(pc.readable()) { device.putc(pc.getc()); } if(device.readable()) { pc.putc(device.getc()); } } }


Please log in to post comments.