Mesh - Two Serial Sensors - One UART

I am hoping to get the community’s input on the challenge of adding an additional serial port to Mesh devices. I was elated when @ScruffR pointed out that the Xenon has two serial ports but my hopes were dashed when I found out that the Ethernet Featherwing (which I also need) uses the same pins as Serial2 on the Xenon.

@rickkas7 came to the rescue with the SC16IS740-based solution but his custom board requires advanced soldering skills.

I thought the problem could be solved by using the board below, but after several days of trying (aggravated by a lack of knowledge of how to debug the workings of a serial port), it has not worked out.

Upon further reflection of my project, I realized that while I am using two serial sensors, only one is used at any given time. I would appreciate the community’s input on how to “switch” between two devices that are connected to one UART. What about if the two devices are running two different baud rates?

Thanks in advance.


Will serial multiplexers work even at different baud rates?

You can always call Serial1.end() and Serial1.begin(newBaudrate).

Thank you @ScruffR.

My only concern would be latency. How long does a serial Port need to start after .begin? I have only about 100 ms.

100ms is ages on a microcontroller like the Xenon.

Sounds good, thank you.