UART Communication multiple devices

Hi there,
I have 3 arduino nanos at different locations and want them to communicate to each other via UART. (Soft UART)

I wrote the programs for each comunication between two of them; everything is fine.
But when I trie put it all thogether, everything compiles, but the communication stops.

Some pics:
NANO 1:

NANO 2 (middle) with wired up to the other 2:


NANO 3:

Example with just communication between two:


and when add the second soft uart: (with other Ports)

Thanks to everyone who help :stuck_out_tongue:

This forum entry might help

It is likely a timing issue if using 2 SoftSerials… So, you have to control the program flow with mutex or flip-flop, etc… And maybe stager the 2nd SoftSerial Init by 1 second Delay?

If you need to send the same data to two boards, then you may need to use two SoftSerial nodes from the master… When data is read from Serial, it is generally removed from the physical buss that holds the message. so, 2 boards getting the same message my not work with Serial, ever… You have to send two independent messages, to each board… Unless the message is one byte, then it may work… The issue is where the electrons are stored physically, and how they are cleared from the bus…

I would try first to send two messages from 2 SoftSerial on Nano 1 (going to nothing), see if it can compile, and see if you can capture the message from each one. Though, it looks like you can only send one SoftSerial at a time… Though, you could design a chipSelect type system, and send the message twoice, if it’s the same message… The chipSelect would decide which reciever would respond to the message.

We may need a .listen() node in XOD for SoftSerial

Hey,
thanks for your ideas :slight_smile:
Yes, I’ve to send different messages to different boards.
With the Delay it didn’t work either… Still same problem.
It’s just like the second SoftwareSerial Node kind of overwrites the first. Because one of the connections works fine. I checked it like you said. I can recieve the message, but only at one of the connections.

Sadly for the chipSelect type system I’ve no clue how to do that.
I’m now going around the problem by using one software and one hardware Serial… Not so elegant, but works.

Have a nice day everyone :smiley:

Hello, I’m sorry I can’t help you. However, I am very interested in your problem. I will reply in time when I find a solution.

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