Hello,
I have been searching the internet and asked on Robotshop forum but have not solved this issue yet. Is it possible to make an array of SoftwareSerial objects such as:
SoftwareSerial softSerial[2] = { SoftwareSerial(2, 3), SoftwareSerial(4, 5) }
It compiles and uploads fine but only the softSerial[1] returns or sends an serial data and softSerial[0] always returns 0. I'm confused because I saw this code:
LED led[5] = { LED(1), LED(2), ... LED(5) } and it works
For example led[4].on() will turn on an led and
softSerial[1].write("hello") will send hello but
softSerial[0].write("hello") sends nothing and returns a 0
I know both serial devices work because if I swap them in the array the other serial device now sends data, but it is always the first instantiation (i.e. softSerial[0]) that does not seem to exist.
Thank you to anyone who has an idea

