UART communication between RP2040 and Uno

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);

}

What about the terminal, it is also connected to that port?

I think I know what the problem is. The operating voltage is different on both devices. Might need to use a level shifter

"Serial" on the rp2040 Nano is going to be the USBSerial port. try Serial1.

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