Serial communication between ESP32 and Arduino UNO

Hello all,

I'm completely new to the Arduino world.
I'm trying to make my ESP32 communicate with arduino UNO, what I want to do is send it a string from ESP32 to the Arduino.
I followed this tutorial but it doesn't work for me. I can print on serial port, but I don't receive anything in the Arduino.

Sender:

//#define RXd0 34
//#define TXd0 35
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}
void loop() {
    Serial.write("Funziona!");
    delay(1500);
}

Receiver:

void setup() {
  Serial.begin(9600);
}
void loop() {
  Serial.println("Messaggio ricevuto:");
  Serial.println(Serial.readString());
  delay(1500);
}

I tried messing around with pins but I cannot figure out the problem.
The schematics of my ESP32 are the following:

There is something wrong in the pin assignment at a software level?

Thank you & nice week end

1 Like

Welcome to the forum

The Uno is a 5V device
The ESP32 is a 3.3V device

Have you got a voltage level shifter in place between the two devices ?

Hi!

No, I didn't. I saw in the guide that I linked that the level shifter is not used. Should I do it?

Also, when I try to run the program they are powered directly by my PC. Is this an issue?

I also tried before to communicate via UART having ESP32 and Arduino UNO through the SmartCar Shield V3 from Elegoo but same result.

Cheers

Yes, you need a level shifter. Look at example 1 on how to use one for serial (UART) communication; Bi-Directional Logic Level Converter Hookup Guide - SparkFun Learn

Sorry, I did not see a link

Powering both devices from the PC is not a problem but have they got a common GND connection ? This is often not needed due to the common USB GND but I would add one anyway

This link: https://www.programmingboss.com/2021/04/esp32-arduino-serial-communication-with-code.html

And here is how I connected the two of them:

Thank you. So, when I was using the shield it was working (I mean with the original manufacturer program - which is Elegoo) - this mean in this case that the level shifter was included in the shield?

Here the picture:

Thanks

please provide a link to the shield.

Are you using the following Board?

The best that I can do is give you the pdf that was in the documentation: https://drive.google.com/file/d/1YT7oi8KtsC5mtLgeh_5hOyz5zGKs6cx3/view?usp=sharing

Hi

I don't hink, mine is this one: ESP32-WROVER Camera-V1.5

image

1 Like

The ESP32 board from post#1 does not match the board from post#14, which makes for 13 postings that were a waste of time.

100% you will need a level shifter to communicate between an Uno and a ESP32cam. One will find the ESP32cam is quite sensitive to voltage and may be ruined already with 5V on its GPIO pins.

At this point you might as well start all over with posting your code in code tags and images of your project all wired up and restating the issue.

the shield is a 5V shield and does not need a level shifter to talk to the Uno which is also a 5V device.

1 Like

One cannot use the Uno's pin-0 and pin-1 for serial comms. One will need software serial on the Uno and the buad rate will be 9600.

The Uno will NOT adequately power the ESP32 cam.

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