user9923: In my project, I have to send a string from one arduino to a second arduino, and make it send the same string to a third arduino. I used UART and SoftwareSerial library, and connected the arduinos like that:
In all the arduinos:
Pin 10 - RX port, pin 11 - TX port

Arduino 1 pin 11    ---->  Arduino 2 pin 10
Arduino 2 pin 11    ---->  Arduino 3 pin 10
Arduino 3             ---->  PC (by hardware Serial)
By theory, Arduino 1 sends string "CA" to arduino 2, which resends that same string to arduino 3, that prints it back on Serial.
The problem is that I get the string "C�" instead of "CA" (that weird "C�" is equal to "067 255" on ASCII).
Does anyone knows why it happens? Maybe there's something wrong with my code?
Here's the code for all the three Arduinos:
Arduino No. 1:
#include <SoftwareSerial.h>

#define ADDR "CA"
SoftwareSerial tiny(10, 11); //TBD

void setup() {
  Serial.begin(9600); //debug only
  tiny.begin(9600);
  delay(2000);

  tiny.write(ADDR);
}

void loop() {
  //nothing here
}

Arduino No. 2:
#include <SoftwareSerial.h>
SoftwareSerial tiny(10, 11); //TBD
void setup() {
  Serial.begin(9600); //debug only
  tiny.begin(9600);
}
void loop() {
  if(tiny.available() > 0) {
    tiny.write(tiny.read());
  }
}

Arduino No. 3:
#include <SoftwareSerial.h>
SoftwareSerial tiny(10, 11); //TBD
void setup() {
  Serial.begin(9600); //debug only
  tiny.begin(9600);
}
void loop() {
  if(tiny.available() > 0) {
    Serial.write(tiny.read());
  }
}

Any idea on what went wrong?

user13995: Arduino #2 should have two SoftwareSerial instances, one to listen to Arduino #1 and another one to talk to Arduino #3:
// In Arduino #2
SoftwareSerial tiny1(10, 11); // Listen to Arduino #1 on pin 10
SoftwareSerial tiny2(8, 9);   // Talk to Arduino #3 on pin 9

You may not need to wire unused signals (11 and 8).
There is an example here : https://www.arduino.cc/en/Tutorial/TwoPortReceive
Note that what you are trying to do is a bus. Serial in Arduino is RS232 based and that is not a bus but a point to point protocol. You should consider using I²C or SPI.

9923: <p>In my project, I have to send a string from one arduino to a second arduino, and make it send the same string to a third arduino. I used UART and SoftwareSerial library, and connected the arduinos like that:</p>

<p><strong>In all the arduinos:</strong>
Pin 10 - RX port, pin 11 - TX port
<a href="https://i.stack.imgur.com/iV307.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iV307.png" alt="enter image description here"></a>
Arduino 1 pin 11    ---->  Arduino 2 pin 10
Arduino 2 pin 11    ---->  Arduino 3 pin 10
Arduino 3             ---->  PC (by hardware Serial)</p>

<p><strong>By theory</strong>, Arduino 1 sends string "CA" to arduino 2, which resends that same string to arduino 3, that prints it back on Serial.</p>

<p><strong>The problem</strong> is that I get the string "C�" instead of "CA" (that weird "C�" is equal to "067 255" on ASCII).
Does anyone knows why it happens? Maybe there's something wrong with my code?</p>

<p>Here's the code for all the three Arduinos:</p>

<p><em>Arduino No. 1:</em></p>

<pre><code>#include &lt;SoftwareSerial.h&gt;

#define ADDR "CA"
SoftwareSerial tiny(10, 11); //TBD

void setup() {
  Serial.begin(9600); //debug only
  tiny.begin(9600);
  delay(2000);

  tiny.write(ADDR);
}

void loop() {
  //nothing here
}
</code></pre>

<p><em>Arduino No. 2:</em></p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
SoftwareSerial tiny(10, 11); //TBD
void setup() {
  Serial.begin(9600); //debug only
  tiny.begin(9600);
}
void loop() {
  if(tiny.available() &gt; 0) {
    tiny.write(tiny.read());
  }
}
</code></pre>

<p><em>Arduino No. 3:</em></p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
SoftwareSerial tiny(10, 11); //TBD
void setup() {
  Serial.begin(9600); //debug only
  tiny.begin(9600);
}
void loop() {
  if(tiny.available() &gt; 0) {
    Serial.write(tiny.read());
  }
}
</code></pre>

<p>Any idea on what went wrong?</p>
 13995: <p>Arduino #2 should have two SoftwareSerial instances, one to listen to Arduino #1 and another one to talk to Arduino #3:</p>

<pre><code>// In Arduino #2
SoftwareSerial tiny1(10, 11); // Listen to Arduino #1 on pin 10
SoftwareSerial tiny2(8, 9);   // Talk to Arduino #3 on pin 9
</code></pre>

<p>You may not need to wire unused signals (11 and 8).</p>

<p>There is an example here : <a href="https://www.arduino.cc/en/Tutorial/TwoPortReceive" rel="nofollow noreferrer">https://www.arduino.cc/en/Tutorial/TwoPortReceive</a></p>

<p>Note that what you are trying to do is a bus. Serial in Arduino is RS232 based and that is not a bus but a <a href="https://en.wikipedia.org/wiki/Point-to-point_(telecommunications)" rel="nofollow noreferrer">point to point protocol</a>. You should consider using I²C or SPI.</p>
