Compilation error camera.pins_h no such file or directory

Hi everyone! How do you solve this kind of problem wherein the code says that there is no such file or directory of the #include "camera.pins_h" I am a student and trying to accomplish our research pls help


Are you certain that filename is correct?
Maybe camerapins.h or camera_pins.h?

Hi @18ayah06. The file camera_pins.h is supposed to be one of the files in the sketch but it is missing from your sketch.

Please add a reply here on the forum thread that provides us with the link to where you found this code. That will give us the context we need to be able to give you instructions for adding the missing file.

hii I really dont have any idea I was just following this code

okayy here ESP32 Cam code upload using Arduino Uno - IoT Starters

You are expected to start from the example sketch that is provided as part of the "esp32" boards platform.

Please try this:

  1. Copy the sketch code from the tutorial to the clipboard.
  2. Select File > Examples > ESP32 > Camera > CameraWebServer from the Arduino IDE menus.
    The "CameraWebServer" example sketch will open in a new Arduino IDE window.
  3. Click on the editor panel of Arduino IDE.
  4. Press the Ctrl+A keyboard shortcut.
    All code in the editor panel will be selected.
  5. Press the Ctrl+V keyboard shortcut.
    The code in the editor panel will be replaced with the code from the tutorial.

Now compile or upload the sketch. Hopefully this time there won't be any errors and everything will work as expected.

1 Like

OMGG IT WORKED THE CODE IS ALREADY UPLOADED HOWEVER THIS IS MY PROBLEM RN

Put Serial.begin() and the other 2 Serial calls in setup().
You have the calls outside the setup function.

is this right?

No. That's probably worse.

void setup() {
   Serial.begin(115200);
   Serial.setDebugOutput(true);   
   Serial.println();
}
1 Like

This error can occur when the port is open in another application. Only one application can have a serial port open at a time so Serial Monitor can't connect to the board under these conditions.

Check to see whether you have any applications running on your computer that might use the port. If they are, close them and then try opening Serial Monitor again.

If opening Serial Monitor still fails with the same error after that, try restarting your computer. In rare occasions, a glitch causes the port to get stuck open. This is one possible cause of the error. Restarting your computer restores the port to the normal working state and so fixes that particular cause of the error.

thank you so much for ur help

thank you so muchhh

You are welcome. I'm glad if I was able to be of assistance.

Regards,
Per

1 Like

hii its me again why did this happen huhu

3 posts were merged into an existing topic: Failed to connect to esp 32 failed uploading