I am trying to communicate between RP2040 and Uno but I am unable to get the Serial connection. I have connected the TX of Nano to RX of Uno and vice versa also connected the GND of both.
Here's my code for Uno:
void setup() {
Serial.begin(9600); // set up serial communication at 9600 baud
Serial.setTimeout(50);
delay(100);
}
void loop() {
String message = " ";
if (Serial.available()){
message = Serial.readString();
Serial.println(message);
delay(100);
}
}
Here's my code for Nano:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
delay(100);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print("ON");
delay(2000);
}