Serial info from esp32-s3 Camera to Arduino uno elegoo kit

I'm trying to send serial data from my esper32-s3 camera to my Arduino uno to control the motors of the elegoo V4.0 robot. I connected both to my laptop while keeping them connected to the shield that comes with the bot.

I then tried this on my esp32 to confirm if any bytes from the :

#define RXD2 33
#define TXD2 4

void setup() {
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);

  delay(2000);
  Serial.println("ESP32 ready");
}

void loop() {
  Serial2.print("Hello");
  Serial.println("Sent: Hello");
  delay(1000);
}

and this on the uno:

String recvLine() {
  String receivedString = "";

  if (Serial.available() > 0) {
    receivedString = Serial.readStringUntil('\n');
    receivedString.trim();
  }

  return receivedString;
}

void setup() {
  Serial.begin(9600);
  Serial.setTimeout(100);
}

void loop() {
  String received = recvLine();

  if (received.length() > 0) {
    Serial.print("UNO RECEIVED: ");
    Serial.println(received);
  }
}

But when I check the serial monitor for the uno I get nothing. I saw this post where this guy got it to work, but for some reason mine's not and I'm not sure what's going on.

Welcome to the forum

As your question has nothing to do with uploading code to the board it has been moved to the Programming category of the forum.

Verify:

  • GROUND pin (power, UNO, ESP32) is shared so each board has the same 0v potential.
  • ESP32-S3 camera (or any device on the S3) does not use pins 33 or 4. verified
  • serial-comm wiring is TX to RX on both lines (Serial and Serial2).
  • ESP32-S3 can read 5v levels from the UNO.
  • UNO can read 3v3 levels from the ESP32-S3.

How are the two boards connected to one another and do they have a common GND connection ?

Note too that the ESP32 is a 3.3V device whilst the Uno is a 5V device

... says...


It’s connected using with this shield that acts as the level shifter in this case. It’s connected in port p8 which has TXD RXD GND and +5V

I tried switching it but nothing happened. Could it be the usb I have connected to my laptop is using the same serial port?

Show a wiring diagram how all devices are connected.

Verify USB cable is for DATA and not just for power.

From what I'm seeing the usb should be for data as it as the external lithium battery:

Disconnect the motors and try again. If it works, your power supply is insufficient. If it does not work, disconnect another device. Continue if needed until only the camera is connected.