Connecting ESP32 cam to Arduino mega2560

Hello,

First of all, I am totally new to Arduino and electronics in general. I have limited basics on all that.

Now, that this is out of the way, I am currently trying to build a pump control project and would like to have control on all that beautiful stuff with Arduino IoT. I currently have an Arduino Mega2560 and an ESP32 CAM.

My current problem is connecting both of these together. As of now, I understand how to make the physical connections (connecting the UoT to pin RX0 and UoR to pin TX0 + connecting the 5V and GND). My problem is on the programming side of things. I tried using the example files for the ESP32 cam, but I am missing something.

I do believe I need to upload something on the mega in order for it to communicate with the ESP32 cam, but I have found nothing about that. Can any of you point me in the direction of a tutorial or a reference I could use to understand that part? As of now I am at a dead end and at the limit of my knowledge on that.

Thank you very much for your help

I guess you have solved the level shifting issue between the 5V Mega and the 3.3V ESP32CAM? The ESP32 is NOT 5V tolerant.

Are you trying to program the ESP32CAM with the Mega or trying to communicate with the Mega.

Using the ESP32CAM's TX0 and RXO is not going to work.

1 Like

Hello, first, here is the connection I have as of now:

What I am trying to do in the end is to have access to my Mega's program remotetly using the ESP32cam. At a later date, I might try using the camera, but that is not my main goal.

I am guessing that part of my problem is that the 3.3V is not connected then?

But - why would you ever want to do that? :roll_eyes:

The ESP32 is vastly more capable than the Mega 2560.

Ok, as I said my knowledge on that subject is very limited. Would I be able to connect an LCD screen, control 4 relays and a level sensor?

My guess was that I would be missing I/O pins to do that am I right?

That would clearly depend on just what all these devices are. A LCD character display with an I²C backpack requires two I²C pins and just one "port expander" can share these same two pins to control 8 or 16 inputs/ outputs.

Alright, I guess I have homeworks to do. I am not familiar at all with that

Re 3.3v to 5v on serial.
There are modules like FTDI and circuits available.

To connect I/O lines between 3.3V and 5V devices, bi-directional level shifters like this one are required, or you will destroy one or both devices. Available from many suppliers.

1 Like

Thank you, I'll get some of those

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