How to make two boards simultaneously transmit and receive messages.
Board 1: transmits data as a structure (x, y ,name)
and receives data from Board 2 as a structure (x, y, name)
.
Board 2: vice versa.
How to make two boards simultaneously transmit and receive messages.
Board 1: transmits data as a structure (x, y ,name)
and receives data from Board 2 as a structure (x, y, name)
.
Board 2: vice versa.
Connect Board A UART to Board B UART (TX-to-RX and RX-to-TX) and use transport protocol with adequate framing and error detection.
They can simultaneously transmit and receive a single byte. Beyond that your code must continuously remove from buffers and continuously add to the buffers. Are you doing that?
Here is an example using two Mega2560s.
are you using an Uno and trying to connect the boards using pins 0/1 also used to download programs to the boards as well as serial monitor messages?
how do you plan on formating messages: binary/ASCII and delimiting one msg from the next? ASCII msg are commonly terminated with a linefeed and can use Serial.readBytesUntil('\n", ...). sscanf() can extract values from the received msg