I am trying to use an Arduino Mega as a multiplexer for serial communication between PC and multiple 'slave' Arduinos.
For this I need 12 instances of SoftwareSerial running. I can create them in the normal fashion:
SoftwareSerial Serial01 (10, 8);
SoftwareSerial Serial02 (11, 9);
.....
But it would be very helpful if i could address them as an array. Something like
SoftwareSerial MySerial[0] (10, 8);
SoftwareSerial MySerial[1] (11, 9);
But that doesn't seem to want to work. I'm not a C++ programmer and things that go beyond what can be found in the examples are a beyond my current grasp. Any hints would be appreciated.