Multiple instances of Softwareserial library

I’m not sure the expander is the solution if it does not buffer for you.

Some systems only communicate when being prompted - so this might be a case where you pick one target system, send a command, listen to what comes back and then go the the next one. If all your "target systems" talk at the same time you really need something in between to capture the chatter (hence two MEGA with 4 ports each, may be one being the master and communicating through I2C with the other one)

I would suggest to study Serial Input Basics to handle listening through all the ports.

@moderator: can you please close and possibly delete this topic? Not helpful at all, unfortunately. Thanks

nomadic68:
@moderator: can you please close and possibly delete this topic? Not helpful at all, unfortunately. Thanks

Topics are neither closed nor deleted. They may be useful to someone else.

...R

can you explain what is

Not helpful at all, unfortunately

you got lots of information to take into account for using multiple software serial ports.

In a nutshell, I'd summarise as

  • don't go for it if you can (ie go to a more capable board)
  • if you need to, only one instance can listen at a given point, other instances will loose incoming data. This has impact on how communication should be driven (best case scenario = master requests/slave answers then go to next slave device)
  • don't go too fast on the baud rate. 9600 seems fine
  • keep communication short to not overwhelm receiver

nomadic68:
@moderator: can you please close and possibly delete this topic? Not helpful at all, unfortunately. Thanks

I disagree that the topic is not helpful. It serves to explain why multiple instances are not to be recommended and suggests alternatives which future reader may find helpful

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.