So I have some code where the purpose is to write commands in the serial monitor and have a bluetooth module respond. That works fine and dandy except when I try to add a second module and change the code to write to that one. I know this is because SoftwareSerial only listens to the last port initialized but I still cannot get the code to work the way I think the operation works.
I think the problem is that you enable listening on a SoftwareSerial port and immediately check to see if a character has arrived. There is no time for a character to arrive so the 'while' loop immediately exits. If you add delays to allow time for a character to arrive that will be extended time during which the OTHER port is dropping characters.
You should switch to an Arduino Mega and use the multiple hardware serial ports.
Not really an option for me unfortunately. I need to construct a module using a pro mini for size requirements.
There has to be an easy way to write this code as it's not an absurd task, I just seem to be missing it.
If you only need to talk to one device you can also split the one serial.
The Arduino TX can go to all nodes. If you can't make a node not listen to serial commands you can add a resistor and pull high switch. (Can be as simple as a Arduino output which you make high to stop transmission and float to enable transmission.)
The RX can be connected to a pull up resistor and via a diode to all nodes. If you need to make them stop transmitting you can do the same trick as above.