Error when Coding esp32-cam with an Arduino Uno

Hello,
I am trying to code my esp32-cam with an Arduino Uno, and I tried to use the "CameraWebServer" example code, but there's an error when I upload the code.

Here is the wiring (left: Arduino, right: esp32-cam):
5V--> 5V
Ground --> Ground
U0R --> RX (with no voltage divider or resistors)
U0T --> TX (with voltage divider*)
Arduino ground --> arduino reset

*For the voltage divider,

  1. The Arduino TX is connected to column 39 on breadboard
  2. Resistor A (1K ohms) connected column 39 and column 43
  3. A wire connected column 43 and esp32-cam U0T
  4. Resistor B (1K ohms) connected E43 and H43 (which aren't connected internally on the breadboard)
  5. Resistor C (1K ohms) connected J43 and ground (of Arduino)

When I upload the "CameraWebServer" example code, this error message is shown:

Sketch uses 1042368 bytes (33%) of program storage space. Maximum is 3145728 bytes.
Global variables use 61228 bytes (18%) of dynamic memory, leaving 266452 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.8.1
Serial port COM5
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x6F): Possible serial noise or corruption.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 2


Why would it happen? Is there a problem with the wiring or the code?
I really appreciate any help you can provide.

I thought it maybe because I didn't connect the GPIO0 of esp32-cam to the GND of esp32-cam. I connected them, and then uploaded the code again.
There's still an error, but the error code is different.

Sketch uses 1043520 bytes (33%) of program storage space. Maximum is 3145728 bytes.
Global variables use 61244 bytes (18%) of dynamic memory, leaving 266436 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.8.1
Serial port COM5
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 2

I program the ESP32-CAM Module with the help of ESP32-CAM-MB Module. Th CMA Module just fits over the edge connector of MB adapter Module.

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