SoftwareSerial with two ports

Hello everyone,

I've been trying to learn how to use SoftwareSerial; I've currently got the twoPortReceive code (https://www.arduino.cc/en/Tutorial/TwoPortReceive) but it doesn't seem to work. I currently have Bluetooth modules on it, and if I comment out one of the portOne.begin(9600); or portTwo.begin(9600); then it will work just fine. If anyone had ideas about what I'm doing wrong that would be greatly appreciated.

Thanks!

SoftwareSerial is very primitive and 2 instances don't really work. Only one of them can listen at any one time.

SoftwareSerial is also hard work for an Arduino. If you need two serial connections you would be better to use a Mega which has 3 spare HardwareSerial ports or a Leonardo of Micro which have 1 spare HwS.

...R

From the SoftwareSerial Library page...

The library has the following known limitations:

If using multiple software serial ports, only one can receive data at a time. Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI). On Arduino or Genuino 101 the current maximum RX speed is 57600bps On Arduino or Genuino 101 RX doesn't work on Pin 13