Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 2 months ago.
Serial port for debugging and another for an Xbee
Naturally I'm a beginner in fact this is my first mbed program other than the usual helloworld types. I'm trying to use a USB serial port for debugging and another for the Xbee RX,TX. I'm getting pinmap not found. I tried the following
Serial pc(USBTX, USBRX); tx, rx Serial xbee(p14, p15); tx, rx int main() { while (1) { if (xbee.readable()) { pc.putc(xbee.getc()); } } although i would prefer the xbee.available/xbee.read routines. I'm sure its simple, any advice ? Best regards
2 Answers
11 years, 2 months ago.
I think you misread the available pins. The serial pins are p13 and p 14 instead of p14 and p15. That is also the error you get: It could not use those pins for a serial object.
11 years, 1 month ago.
Yes that was a rather silly mistake which i corrected, I am however having problems. The keyboard hangs. I even tried removing the USB wireless Keyboard and connected a standard serial keyboard. It still hangs and sometimes the USB mouse does too. Is there a way to have two serial connections to an mbed, one for the PC the other for an xbee ?