ESP32-CAM does not print anything on Serial Monitor

It Does NOT Work !
-- So what is the solution ???

Buy another 'It' ?

Sorry , does Not work !
I am using Esp32-Cam on arduino 1.8.2 & 2.0.3

Can program the Esp32 fine,
esp32 successfully drive the LCD to change colors ,
but both do Not print anything on the Serial Monitor.

void setup()
{
delay(1000); // - delay - wait for Serial to connect
Serial.begin(9600);
delay(1000); // - delay - wait for Serial to connect
while( ! Serial ) {}
Serial.println("ESP32-CAM Picture");
...
// changes LCD colors //
...

Esp32 changes the LCD colors,
but, nothing goes to Serial Monitor window,
nothing on PuTTY either.

I have merged your cross-posts @jlsilicon.

Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting can result in a suspension from the forum.

In the future, please don't make multiple duplicate posts on this forum. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Meaningless and not helpful to the forum to post small snippets of code.

And as I recall, the ESP32CAM does not have an LCD.

Describe your actual project and setup, if you want assistance.

This is : ESP32-CAM Project: ESP32-CAM with TFT to display picture (ST7735)
https://www.survivingwithandroid.com/esp32-cam-tft-display-picture-st7735/

#include <Arduino.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <TJpg_Decoder.h>

#include "esp_camera.h"
#define CAMERA_MODEL_AI_THINKER // Has PSRAM

#include "camera_pins.h"

#define TFT_RST  12  // RES
#define TFT_MOSI 13  // SDA 
#define TFT_CS   15  // CS - Chip select control pin
#define TFT_SCLK 14  // SCL
#define TFT_DC    2  // DC - Data Command control pin

#define PIN_BTN 4


Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

bool tft_output(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t* bitmap)
{
   // Stop further decoding as image is running off bottom of screen
  if ( y >= tft.height() ) return 0;
   tft.drawRGBBitmap(x, y, bitmap, w, h);
   // Return 1 to decode next block
   return 1;
}


void init_camera() 
{
  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sscb_sda = SIOD_GPIO_NUM;
  config.pin_sscb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.pixel_format = PIXFORMAT_JPEG;

  // if PSRAM IC present, init with UXGA resolution and higher JPEG quality
  //                      for larger pre-allocated frame buffer.
  if(psramFound())
  {
    config.frame_size = FRAMESIZE_QQVGA;
    config.jpeg_quality = 10;
    config.fb_count = 1;
    Serial.println("PSRAM");
  } else {
    config.frame_size = FRAMESIZE_QQVGA;
    config.jpeg_quality = 12;
    config.fb_count = 1;
  }

  #if defined(CAMERA_MODEL_ESP_EYE)
    pinMode(13, INPUT_PULLUP);
    pinMode(14, INPUT_PULLUP);
  #endif

  // camera init
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) 
  {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }

  sensor_t * s = esp_camera_sensor_get();
  // initial sensors are flipped vertically and colors are a bit saturated
  if (s->id.PID == OV3660_PID) 
  {
    Serial.println("PID");
    s->set_vflip(s, 1); // flip it back
    s->set_brightness(s, 2); // up the brightness just a bit
    s->set_saturation(s, 0); 
  }
  
}

void setup() 
{
   delay(1000);          // - does not help 
  Serial.begin(9600);
   while( ! Serial ) {}  // - does not help

  Serial.println("ESP32-CAM Picture");

  tft.initR(INITR_BLACKTAB); 
  tft.setRotation(1);
  tft.fillScreen(ST77XX_GREEN);
  init_camera();
  pinMode(PIN_BTN, INPUT);
  TJpgDec.setJpgScale(1);

  // The decoder must be given the exact name of the rendering function above
  TJpgDec.setCallback(tft_output);
}

void take_picture()
{
  Serial.println("Taking picture..");
camera_fb_t * fb = NULL;
    
  fb = esp_camera_fb_get();
  if (!fb) {
      Serial.println("Camera capture failed");
  }
    
uint16_t w = 0, h = 0;
  TJpgDec.getJpgSize(&w, &h, fb->buf, fb->len);
  Serial.print("- Width = "); Serial.print(fb->width); Serial.print(", height = "); Serial.println(fb->height);
  
  Serial.print("Width = "); Serial.print(w); Serial.print(", height = "); Serial.println(h);
  // Draw the image, top left at 0,0
  TJpgDec.drawJpg(0, 0, fb->buf, fb->len);     
}   

void loop() 
{
  while (true) 
  {
     int state = digitalRead(PIN_BTN);
     if (state == HIGH) 
     {
       Serial.println("Button pressed");
Serial1.println("- Button pressed");
       take_picture();
     }

     delay(200);
  }
}

-- Is that clear ?

I (and other Users) generally need a UART to debug on , but this blocks it.
-- My problem is that the LCD clears / paints green - but displays no snapshot when the button is pressed (although it flashes the LED) ,
so I assume that the camera is not taking a photo - but I have nothing to debug with - to figure out why ...

For Esp32-Cam Users : the Past / Current Serial to PC problem is :
GPIO0 is interfering with DTR.

Its not a code issue.
Its a Pin Hardware conflict problem.

I see lots of complaints posted about it - but No Solution.
So how to fix it ?

But is it an installation problem?

No.
So why post it here?

Its a pin conflict problem.
It needs a solution.

Other pages had the same complaint, and I posted replies.
You moved it here.

  • Who said 'Install' problem ?
  • Who said 'It / One Board' ?
    This applies to the general Esp32-Cam boards and developers.

I am trying to find a solution,
or maybe somebody else can.
So, that me and the other Esp32-Cam develepers can have a UART to Debug on.

Sad that you do not want to actually help ...

Huh?

I was given messages that my other posts from other posts Esp32-Cam Serial port problem
-- was moved here by some admin.

There are posts all over about this same problem :
[Serial Monitor Not Working On Esp32(SOLVED)]
[<SOLVED>IDE 2.0.0-rc2 problem with serial monitor and ESP32-CAM]
[ESP32 Cam no Serial Output - #4 by marce85]
[ESP32-CAM MB problem]
[Having Trouble Getting Arduino IDE 2.0 Serial Monitor to Print IP of ESP32 Cam]

  • There are mentions of solutions - but nothing actually fixes it - people still repeat posts of not solved.

Problem solved with PlatformIO :
Add following lines in platformio.ini file :

monitor_rts = 0
monitor_dtr = 0

no, platformio.ini in arduino ide

/arduino/hardware/platform.txt ?
/arduino/hardware/arduino/avr/platform.txt ?

Are you saying to install PlatformIO IDE ?

I use platformIo on vscode, I don't use Wiring/arduino IDE.

I give what I know.

Equivalent of those two lines must exist with Wiring/arduino IDE, but since I don't use it, I'm not looking for.

How ?

There is no DTR connection to the ESP32CAM, least not on the ones I have seen.

I am quoting from other sources.
GPIO0 is DTR , so if it is tied for Reset / Boot ...
Maybe it is checked at boot as Input , so it is not outputing for sync.

On the ESP32CAM GPIO0 is just GPIO0, the pin that needs to be held low for the bootloader to work when RESET is pressed, and on the ESP32CAM this has to be done manually.

DTR on some USB - Serial adapters is connected via a capacitor to the RESET pin on the processor, so a pulse on DTR is used to start up the bootloader, such as on the Arduino Pro Mini (but not on the ESP32CAM).

But DTR on an ESP32CAM has no meaning.

The code could be hanging before the Serial output has had a chance to be printed. To be sure to see the startup message add a Serial.flush();

Serial.begin(9600);
Serial.println("ESP32-CAM Picture");
Serial.flush();

DTR with ESP32CAM + ESP32CAM-MB has meaning.
OP uses probably this MB board.

Probably ?

The project link the OP provided shows just an ESP32CAM ...........