i'm Trying to send data via UART from DUE Bored to Nano Bored
at First i try to send Data from Nano to Due and it work. but if i send the same data from Due to Nano it never recive it and my serial1 are not Available.
Here is the code sending Data from Due to nano what it works. Nano Send Data Via Serrial1 to Due
void setup()
{
Serial.begin(115200);
Serial1.begin(115200);
}
void loop()
{
delay(1000);
Serial1.print('h');
Serial.print('h');
}
Here Due Recives the Data
char r;
void setup()
{
Serial.begin(115200);
Serial1.begin(115200);
}
void loop()
{
if (Serial1.available() > 0)
{
Serial.println("Serial1");
r=Serial1.read();
Serial.println(r);
}
and now i want to send data from due to Nano so i just switch the code.
Due should be sending with Serial1 Write or serial1 print and the code for DUE now looks like
void setup()
{
Serial.begin(115200);
Serial1.begin(115200);
}
void loop()
{
delay(1000);
Serial1.print('h');
Serial.print('h');
}
and nano should recive the Data with serial read
char r;
void setup()
{
Serial.begin(115200);
Serial1.begin(115200);
}
void loop()
{
if (Serial1.available() > 0)
{
Serial.println("Serial1");
r=Serial1.read();
Serial.println(r);
}
}
but the Serial1 is not available
do someone know where is the problem could be ?
thanks you all