Esp32 serial connection

I have a esp32 camera but it did not come with a programmer so i bought the usb mb programmer.


So i want to take a photo whenever my sensor on the arduino is above a certain treshold. how do i make the serial connection no video I've come accross so far was able to address this issue.

Note: this is the esp32cam not the esp32.
TLDr: i made an obstacle avoiding robot but i want to attach the esp32 camera to the robot.
So what i want is whenever there is an obstacle the esp32 cam takes a photo. So i need a serial connection between them.

Once you have uploaded your sketch to the ESP, you can get rid of the MB, so that you’ll have some GPIOs free. You’ll have to find a way to feed the ESP with 5V, but doing so you can connect the sensor (which sensor by the way?) directly into the ESP and get rid of the other board.

i made an obstacle avoiding robot but i want to attach the esp32 camera to it.
So what i want is whenever there is an obstacle the espcam takes a photo. So i need a serial connection between them

Either way you’ll need to get rid of the MB once you have uploaded the sketch to the CAM.

These links might give you clues and associated problems:

https://forum.arduino.cc/t/serial-communication-between-esp32-and-arduino-uno/

https://forum.arduino.cc/t/how-to-connect-esp32-to-arduino-uno-via-serial-connection/

on the ESP32-CAM I used GPIO 14 Rx and 15 Tx for Serial1

// 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);
  }
}

e.g. ESP32-CAM connected to a ESP32

how can i replicate this on the arduino uno.
Because for the car needs to work without having to connect the esp32cam via cable to my laptop