7 years, 1 month ago.

Serial Communication on Arduino GPIO Pins

I am trying to communicate via UART Serial on the Arduino/mDot common pins (A0/PB1, A1/PB0, A2/PC1) When I try a simple loop serial communication to echo whats type on the serial, everything works fine. However on trying a serial tx/rx with the arduino pins the binary complains for pinmap not found on peripheral.

Code:

  1. include "mbed.h"

Serial pc(USBTX,USBRX); Serial arduino(PB_0, PB_1);

int main() { pc.baud(115200); arduino.baud(115200); pc.printf("Start Communicating...."); while(true){ if(pc.readable()){ pc.putc(pc.getc()); For Looping serial communication and echo typed characters arduino.putc(pc.getc()); }

if(arduino.readable()){ pc.putc(esp8266.getc()); } } }

The development board used is UDK2 and the daughter board used is mDot. The arduino has a Wifi Shield connected to the arduino compatible pins. Also I am using the micro USB for the Debug serial. The JP95 jumpers are removed.

Question relating to:

MultiTech's official mbed team.
Be the first to answer this question.