ESP32 Cascading

Hello everyone, I had a doubt. How can I connect ESP32 camera with a normal ESP32 , such that the esp32 camera clicks pictures and send it to the normal esp32, over wired connection ?
The connection between the esp32 camera and the normal esp32 should be wired connection.

The preferred connection for my project is UART. Can someone please share the pin connections too ?

Check if the following diagram (Fig-1) comes at your help.


Figure-1:

1 Like

You posted in the wrong category. The one you posted in was for the category only for the Arduino ESP Nano. Nothing else.

I have moved it here, where it belongs.

1 Like

I have used Serial1 on pins 14 and 15

// ESP32-CAM  Serial1 test

// for loopback test connect pins 14 and 15

#define RXD1 14
#define TXD1 15

void setup() {
  // initialize both serial ports:
  Serial.begin(115200);
  Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
  Serial.println();
  Serial.println("serial1  test Rx pin 14 Tx pin 15");
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    //Serial.write(inByte);
    Serial1.write(inByte);
  }
}

run program - connect pin 14 to 15 to form a loopback test
text entered on serial monitor should echo back to screen

1 Like

Does it echo?
Are you using 30-pin or 38-pin version of ESP32 Dev Module?

1 Like

the code of post 4 was what I used on a ESP32-CAM using pins 14 and 15

on an ESP32 I tend to use pins 16 and 17, e.g.

// ESP32  Serial1 test - for loopback test connect pins 16 and 17

#define RXD1 16
#define TXD1 17

void setup() {
  // initialize both serial ports:
  Serial.begin(115200);
  Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
  Serial.println();
  Serial.println("\n\nESP32 serial1  test Rx pin 16 Tx pin 17");
  Serial.write("   for loopback test connect pin 16 to pin 17\n");
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    //Serial.write(inByte);
    Serial1.write(inByte);
  }
}

however, pins 14 and 15 also work OK - I am using a 38pin ESP32 dev module

1 Like

Thank You sir, this is really a helpful diagram.

Referring to the above diagram by @GolamMostafa , are you talking about the IO#14 & IO#15 pins as RXD1 and TXD1 of your code , or are you talking about the IO#3(U0RXD) and IO#1(U0TXD) ?

yes

1 Like

Can you please help me in solving out this problem,

I uninstalled and reinstalled the driver. But it doesnt seem to work.

what board did you use - I Select Board "AI Thinker ESP32-CAM"

are you sure you have the correct COM port?
if you run the Device Manager does COM port appear/disappear as plug/unplug the microcontroller?
disconnect everything (sensors, motors, etc) from the ESP device
try a different USB port
try a different USB cable (some are charge only)

1 Like

Proceed in a systematic way.
1. Upload a sketch into ESP32-CAM to blink the onboard LED at 1-sec interval and send the message "Forum" to the ESP32 over UART1 also at 1-sec interval. Check that the onBoard LED blinks.

2. Connect ESP32-CAM and ESP32 using UART1 Port.

3. Uplaod a sketch into ESP32 to acquire signal from its UART1 Port and shows on its Serial Monitor.

4. Check that the onboard LED of ESP32-CAM blinks and the Serial Monitor of ESP32 shows Forum at 1-sec interval.

5. Now, carry out your Project.

1 Like

I used the same AI Thinker board.

Thank You for all the help.
Can you please mention the category so that I can post in the right column ?

Right here

image

That is what I did, I moved it to the right place for you.

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