ESP32-CAM Video Streaming and Face Recognition with Arduino IDE
This article is a quick getting started guide for the ESP32-CAM board. We’ll show you how to setup a video streaming web server with face recognition and detection in less than 5 minutes with Arduino IDE.
Note: in this tutorial we use the example from the arduino-esp32 library. This tutorial doesn’t cover how to modify the example.
Related project: ESP32-CAM Video Streaming Web Server (works with Home Assistant and Node-Red)
Watch the Video Tutorial
You can watch the video tutorial or keep reading this page for the written instructions.
Parts Required
To follow this tutorial you need the following components:
You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!
Introducing the ESP32-CAM
https://youtu.be/MicAM_A0_lU
The ESP32-CAM is a very small camera module with the ESP32-S chip that costs approximately $10. Besides the OV2640 camera, and several GPIOs to connect peripherals, it also features a microSD card slot that can be useful to store images taken with the camera or to store files to serve to clients.
The ESP32-CAM doesn’t come with a USB connector, so you need an FTDI programmer to upload code through the U0R and U0T pins (serial pins).
Features
Here is a list with the ESP32-CAM features:
- The smallest 802.11b/g/n Wi-Fi BT SoC module
- Low power 32-bit CPU,can also serve the application processor
- Up to 160MHz clock speed, summary computing power up to 600 DMIPS
- Built-in 520 KB SRAM, external 4MPSRAM
- Supports UART/SPI/I2C/PWM/ADC/DAC
- Support OV2640 and OV7670 cameras, built-in flash lamp
- Support image WiFI upload
- Support TF card
- Supports multiple sleep modes
- Embedded Lwip and FreeRTOS
- Supports STA/AP/STA+AP operation mode
- Support Smart Config/AirKiss technology
- Support for serial port local and remote firmware upgrades (FOTA)
ESP32-CAM Pinout
The following figure shows the ESP32-CAM pinout (AI-Thinker module).
There are three GND pins and two pins for power: either 3.3V or 5V.
GPIO 1 and GPIO 3 are the serial pins. You need these pins to upload code to your board. Additionally, GPIO 0 also plays an important role, since it determines whether the ESP32 is in flashing mode or not. When GPIO 0 is connected to GND, the ESP32 is in flashing mode.
The following pins are internally connected to the microSD card reader:
- GPIO 14: CLK
- GPIO 15: CMD
- GPIO 2: Data 0
- GPIO 4: Data 1 (also connected to the on-board LED)
- GPIO 12: Data 2
- GPIO 13: Data 3
Video Streaming Server
Follow the next steps to build a video streaming web server with the ESP32-CAM that you can access on your local network.
1. Install the ESP32 add-on
In this example, we use Arduino IDE to program the ESP32-CAM board. So, you need to have Arduino IDE installed as well as the ESP32 add-on. Follow one of the next tutorials to install the ESP32 add-on, if you haven’t already:
- Installing the ESP32 Board in Arduino IDE (Windows instructions)
- Installing the ESP32 Board in Arduino IDE (Mac and Linux instructions)
2. CameraWebServer Example Code
In your Arduino IDE, go to File > Examples > ESP32 > Camera and open the CameraWebServer example.
The following code should load.
Before uploading the code, you need to insert your network credentials in the following variables:
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
Then, make sure you select the right camera module. In this case, we’re using the AI-THINKER Model.
So, comment all the other models and uncomment this one:
// Select camera model
//#define CAMERA_MODEL_WROVER_KIT
//#define CAMERA_MODEL_ESP_EYE
//#define CAMERA_MODEL_M5STACK_PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE
#define CAMERA_MODEL_AI_THINKER
If none of these correspond to the camera you’re using, you need to add the pin assignment for your specific board in the camera_pins.h tab.
Now, the code is ready to be uploaded to your ESP32.
3. ESP32-CAM Upload Code
Connect the ESP32-CAM board to your computer using an FTDI programmer. Follow the next schematic diagram:
Many FTDI programmers have a jumper that allows you to select 3.3V or 5V. Make sure the jumper is in the right place to select 5V.
Important: GPIO 0 needs to be connected to GND so that you’re able to upload code.
ESP32-CAM | FTDI Programmer |
GND | GND |
5V | VCC (5V) |
U0R | TX |
U0T | RX |
GPIO 0 | GND |
To upload the code, follow the next steps:
1) Go to Tools > Board and select AI-Thinker ESP32-CAM.
2) Go to Tools > Port and select the COM port the ESP32 is connected to.
3) Then, click the upload button to upload the code.
4) When you start to see these dots on the debugging window as shown below, press the ESP32-CAM on-board RST button.
After a few seconds, the code should be successfully uploaded to your board.
Getting the IP address
After uploading the code, disconnect GPIO 0 from GND.
Open the Serial Monitor at a baud rate of 115200. Press the ESP32-CAM on-board Reset button.
The ESP32 IP address should be printed in the Serial Monitor.
Accessing the Video Streaming Server
Now, you can access your camera streaming server on your local network. Open a browser and type the ESP32-CAM IP address. Press the Start Streaming button to start video streaming.
You also have the option to take photos by clicking the Get Still button. Unfortunately, this example doesn’t save the photos, but you can modify it to use the on board microSD Card to store the captured photos.
There are also several camera settings that you can play with to adjust the image settings.
Finally, you can do face recognition and detection.
First, you need to enroll a new face. It will make several attempts
to save the face. After enrolling a new user, it should detect the face
later on (subject 0).
And that’s it. Now you have your video streaming web server up and running with face detection and recognition with the example from the library.
Troubleshooting
If you’re getting any of the following errors, read our ESP32-CAM Troubleshooting Guide: Most Common Problems Fixed
- Failed to connect to ESP32: Timed out waiting for packet header
- Camera init failed with error 0x20001 or similar
- Brownout detector or Guru meditation error
- Sketch too big error – Wrong partition scheme selected
- Board at COMX is not available – COM Port Not Selected
- Psram error: GPIO isr service is not installed
- Weak Wi-Fi Signal
- No IP Address in Arduino IDE Serial Monitor
- Can’t open web server
- The image lags/shows lots of latency
Wrapping Up
The ESP32-CAM provides an inexpensive way to build more advanced home automation projects that feature video, taking photos, and face recognition.
In this tutorial we’ve tested the CameraWebServer example to test the camera functionalities. Now, the idea is to modify the example or write a completely new code to build other projects. For example, take photos and save them to the microSD card when motion is detected, integrate video streaming in your home automation platform (like Node-RED or Home Assistant), and much more.
We hope you’ve find this tutorial useful. If you don’t have an ESP32-CAM yet, you can grab it here.
If you like this project, you may also like other projects with the ESP32-CAM:
- ESP32-CAM Video Streaming Web Server (works with Home Assistant and Node-RED)
- ESP32-CAM Take Photo and Save to MicroSD Card
- ESP32-CAM PIR Motion Detector with Photo Capture (saves to microSD card)
- ESP32-CAM Take Photo and Display in Web Server
- Build ESP32-CAM Projects (eBook)
- Read all our ESP32-CAM Projects, Tutorials and Guides
TF card 4GB limit. Will larger capacity cards, i.e. 8GB work, but only 4GB will be usable? Smaller cards are getting harder to find. FAT-16 format required?
Hi Bruce.
I haven’t tested with 8GB sd cards. I’ll need to check if those work too.
It needs to beet FAT-32 format.
Regards,
Sara
Can you help me because my ESP 32cam keeps showing this again and again and it doesnt show the IP address…
Also my ESP 32 CAM doesnt have AI-THINKER marked in it.
Do you have any ideas about this? I badly need your help..
Carst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Hi.
It seems that your board is booting constantly. Try pressing the RST button several times to see if it solves the problem.
If it doesn’t, double-check that you’re powering the ESP32-CAM with 5V on the 5V pin (not VCC).
It may also help taking a look at our troubleshooting guide bullet 2 and 3: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
I hope this helps.
Regards,
Sara
Hi, i am planning to create a attendance system using esp32. Do u have suggestion that i might follow? i really appreciate the help thanks
Hi.
We have this project for the Arduino.
You can see if you can modify it to work with the ESP32: https://randomnerdtutorials.com/arduino-time-attendance-system-with-rfid/#:~:text=When%20you%20swipe%20an%20RFID,a%20preset%20hour%20and%20minute.
Regards,
Sara
Probably because of to low voltage under upload, you have to use 5 volt not 3.3 volt on your ftdi uploader. I made the same error and got same result as you did. After setting ftdi to 5 volt it worked fine.
I don’t understand how it is possible to use 5V with the ESP 32. As far as I know is the maximum voltage for the GPIO-Pins 3.3 – 3.6V.
How is it still possible that the ESP32 doesn’t get fried?
Did you remove jumper of GPIO0 and GND?
Hi, I am facing the same issue. Can you help how get you get yourself resolved with this ?
im getting the same error ..but i have try so many times clicking the Rst button still the same ..how to fix it .have u fix the issue. please help me.
ok. the more simple question is: if your SSID network name and password is correct. this was my error on the past…:-(
Hi Sara, can you tell me what are the variable of x, y, w, and h? and how to get those variable?
do we really need micro SD card for face recognition, cause im not using it and i cant enroll my face
how to enroll a new face?
Thanks very much for this ESP32-CAM project, I am looking forward to learning the camera applications, it is my first.
Unfortunatly I am getting the following error returned to the serial monitor after reset:
SCCB_Write [ff]=01 failed
SCCB_Write [12]=80 failed
[E][camera.c:1085] esp_camera_init(): Camera probe failed with error 0x20001
Camera init failed with error 0x20001
I have updated the arduino IDE to 1.8.9 and ESP32 boards as per instructions, but cant find the problem. If you have any ideas I really appriecate it.
Hi James.
Did you select the right camera module in the code?
Please double check that your camera is well connected to the board.
I also found this issue: github.com/espressif/esp32-camera/issues/5
It seems the same as yours, so it might help.
Regards,
Sara
Hi James. Did you ever get a resolution on this problem? I purchased two units and they are responding the same.
Hi Dan, yes I took Sara’s advice and selected the correct camera module in the code but commenting out the ones that don’t apply. I did also find reducing the upload speed made things more stable. I think my programmer is not the best.
Very happy it works very well. Thanks again
can you help me how to modify code to push stream to my public proxy url on the internet?
I want to make a page which accessible publicly and don’t want to have public ip for my local network. so needs esp to stream to my proxy url itself
Hi Dan, did you found the solution. I also purchase two units with different brand with same issue. (the first one have successed before but when retry to reupload the issue came).
Try all suggestions here by changing board selection, changging cable, changging programmer device, changging pins selection, try with different PC and all have same problem.
I Had the Same Camera init failed with error 0x20004. I powered the ESP32 with 5v and works great. May try the 5V to see if it goes away.
THANKS For this great site and tutorials!!!!!
Any update on card sizes??? Brand name 4 GB cards are special order. When I find 4GB they are almost as expensive as 16/32GB sizes. Ebay takes forever anymore, and then you don’t know what you are getting. No name brand on Ali Express or Banggood.
Hi David.
You can use SD cards with larger capacity.
Hi Sarah, do you have a code that use esp32 cam as qr code scanner and send to webpage with Database?? Please for my school project purpose
Hi.
I’m sorry, but we don’t have any project about that subject.
Regards,
Sara
Hi. Great tutorial; worked like a charm once used a separate 5V supply.
Any way you know of to see the video stream or stills via a TFT display on another ESP through web browser or otherwise? I’ve used ESPNow between ESP12’s or 32’s for display of thermal cam images but they’re much smaller. Avoids need for phone or laptop tied up….
Thanks
Mel
Hi, thanks for the tutorial, but I’m getting 2 problems with the code :
1. I can’t include the zip file through “Add .ZIP library” from Arduino IDE
2. When I put it manually through extracting the zip file and moved it to my Arduino libraries folder, then compile the code, I got “no headers files (.h) found” error
Any help would be appreciated, thanks again for the tutorial.
Hi Mario.
You don’t need to install any library. You just need to have the ESP32 add-on installed.
The zip file that we provide contains all the code that you need.
You just need to unzip the file, open the CameraWebServer folder and open the CameraWebServer.ino.
Your arduino IDE should open the code and you’ll see three tabs at the top. Then, you just need to upload the code to your board.
Alternatively, if you have the latest updated ESP32 add-on, you should have the code in your examples. Go to File > Examples > ESP32 > Camera and open the CameraWebServer example.
I hope this helps.
Regards,
Sara
i got this error when upload the code on esp32-cam using ftdt programer
A fatal error occurred: Invalid head of packet (0x65)
Hi, nice tutorial, Can I with ESP32CAM store not manually pictures and for example check if have a car in picture?
I was looking for something like this for my recent project, Thanks! Great tutorial! But I think ESP32-CAM is “unofficial” combination of ESP32 with a camera. I think Espressif themselves released a dedicated “official” ESP32+camera board called ESP-EYE with their own “official” software library called ESP-WHO.
Well I got all the information from here: https://www.ebay.com/itm/254177708782
Have not tried that board myself. Can you make a tutorial on that as well since that is the “official” hardware and software and would have longer support from Espressif itself.
Also a comparison between the 2 would be great too.
I follow a lot of Random Nerd Tutorials. You guys make easy to follow guides. Cheers! Keep it up!
Thanks!
Hi Ryan.
Thank you for your nice words.
The ESP-EYE is an Espressif release.
We haven’t fully tested the ESP-EYE yet. We’ve played with the example firmware that they provide and we made a blog post about it that you can read here: https://makeradvisor.com/esp-eye-new-esp32-based-board/
At the moment, we don’t have any more tutorials with the ESP-EYE.
Thank you for your interest in our content.
Regards,
Sara
Brownout detector was triggered
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10088
load:0x40080400,len:6380
entry 0x400806a4
What happened? ¿Qué ocurre? Thx
Hi David.
That’s usually a power issue.
Please see our troubleshooting guide bullet 8: https://randomnerdtutorials.com/esp32-troubleshooting-guide/
Regards,
Sara
Hello.
I faced the same problem with a recent FTDI.
Replacing it by an older one (with a large USB connector), the problem has been fixed.
Could be it is the same for you.
Regards.
F.Thomart
use 5V
Hi David
Same thing happened to me. The brownout reset occurs when the power supply to the ESP32 processor is below a minimum level.
Try to check the cable, connections, power source … etc. If you can, try to measure the voltage that goes directly to the pins on the ESP32CAM board. It should be the closest to 5 Volt.
I can somehow integrate this recognition face to my Home assistant?
Hi.
Follow this tutorial: https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/
Thanks, it will be of great help, recently I was able to integrate my esp32 cam into an MQTT client library, every face detected a publisher is sent to the broker
That’s a great project.
Will you publish your project somewhere? Many people here might be interested.
Regards,
Sara
I have not shared it yet, but I can post here if you wish, I used the pubsubclient library to transform esp32cam into a Mqtt client
Hello Felipe, that would be a great add on to this !!!
Any development ?
It would be very useful if you share your project, also trying to do the same. Thanks in advance Felipe!
Greetings and congratulations for the tutorial. You are a very nice couple.
Is it possible to take this captured image to a server on the internet?
Can I have this camera in my house and see what happens from my work?
Thank you.
Hi Rui & Sarah,
How do you set up face recognition ?
I have the whole thing working as expected, however the Enroll face button does nothing ?
It seems that face recognition is no longer working (at least with the example program) when using the 1.02 ESP core.
Rolling back to the 1.01 core and using the example program belonging to that core, will ‘fix’ it (currently that is the program that Sara and Rui have on their Github
Hi, how do i roll back to the 1.01 core ? i have the same problem of Neil, the Enroll face button does nothing.. can you help?
You need to go to the Boards Manager, search for ESP32, select that version and install 1.0.1.
I have tried that and no luck. I keep getting different errors.
Hi Guys,
I purchased two units and both fail with the following:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10088
load:0x40080400,len:6380
entry 0x400806a4
[D][esp32-hal-psram.c:47] psramInit(): PSRAM enabled
[E][camera.c:1085] esp_camera_init(): Camera probe failed with error 0x20001
Camera init failed with error 0x20001
I’ve selected AI Thinker in the code and reduced the upload to 115200. Anyone have some insights? I have a M5Stack Camera which works pretty well with the code but these two are dead.
Thanks
Dan
Hi! good tutorial!, I need to put the upload speed 115200 and the flash frequency in 40Mhz to avoid a Guru Meditation Error: Core 0 panic’ed (InstrFetchProhibited) error if someone have the same problem
Hi Leonardo.
thank you for sharing.
It will definitely be useful for many people.
Regards,
Sara
Heyy hai how to count number of faces it is getting detected ?? like the count should be displayed
that feature is not implemented at the moment..
Got my cameras today – your tutorial above works perfectly!
Any idea how to turn on the “flash light” LED?
Thanks much,
ben
There is a small red led (GPIO33 inverted) . The main led is controlled by GPIO4. In the example CamWebServer program there is AFAIK no possibility in the webserver to switch the main LED.
Should be possible though to program Switching the LED and control it via say HASSio or OpenHab, with an MQTT command or something. If there are any unused pins, you could add a switch
How about: arduinodiy.wordpress.com/2019/08/03/turning-led-off-and-on-on-the-esp32-camera-module-using-bluetooth/
I am having problems getting errors: camera_probe(): Detected camera not supported.
esp_camera_init(): Camera probe failed with error 0x20003.
That occurs selecting AI Thinker. The other two options give me the 0x20001 error. I bought the esp camera from DIYMORE.CC. The description in their ad prints AI Thinker on the chip, but my actual device does not have AI Thinker printed. It just has DM-ESP32-S.
Any ideas?
Did you find a solution or the correct IDE setting for your DM ESP32?
I have the same modules but haven’t used them yet.
I’d appreciate your input.
i have the same DM board, used the same IDE settings as mentioned here, no problem with the arduino sample, except must use 5v power otherwise will keep getting brownout error
Thanks Great Job
But i have almost the same problem as Neil.
face recognition works very bad i get almost no yellow square
how to ficks that?
Hi.
Face recognition is a bit slow, however we managed to make it work fine.
Please make sure that you have proper lighting to make the face recognition process easier and more efficient. Also, when enrolling a new face, you need to be steady and don’t move much, so that it properly saves your face features and can recognize it in the future.
Regards,
Sara
Hi,
Got my hardware last week from banggood. It had the issue “Brownout detector was triggered”. Seaching the web i found this video where they say to feed by 5v not 3.3v.
https://www.youtube.com/watch?v=tzmcXZ-irIc ~2:30
This solved the brownout issue for me.
Then the web service did not appear in google chrome browser. Error message was something about too much header lines or so. In MS Edge it was ok. But i have no image from the cam. Cam must be broken. So i have to wait another month to get this as spare part. Have also ordered another ESP board with an external antenna hoping to get better connection to the router.
Hi Patrick.
I’m sorry you’re getting trouble using your ESP32-CAM.
The brownout detector error usually means that the ESP32 is not being powered properly. You can read more about this on our troubleshooting guide, bullet 8: https://randomnerdtutorials.com/esp32-troubleshooting-guide/
Our camera worked flawlessly following the steps we describe in our tutorial.
The ESP32-CAM should work fine being powered either with 3.3V through the 3.3V pin or 5V through the 5V pin. You’re probably not providing enough current.
Also, we didn’t have any trouble accessing the web server on Google Chrome.
After you get a new camera, let us know how it went.
Regards,
Sara
Any ideas what would cause a 20003 error? I have tried all three camera types. The AI Thinker gives 20003. The other two cause a 20001 error
Hi John.
I’m sorry you’re having that issue.
Those errors usually mean that the camera is not properly connected. So, or your camera module is faulty or it is not properly connected.
If these are not the reasons, it is very difficult for us to understand what is going on.
Can you try using a new camera probe?
Regards,
Sara
Thanks. The camera came installed. I bought 2 of them, and they both fail. I decided to buy from another source and see if that works.
I am not sure what you are referring to regarding a new camera probe.
Hi John.
I’m talking about the camera only (without the ESP32 board)
Regards,
Sara
Dear ALL
ESP32 doesn´t connect with mit Network and no text in Serial Monitor is being printed. SID and PW changed in coding. Any Ideas?
Message in Arduino 1.8.8:
Der Sketch verwendet 2233514 Bytes (71%) des Programmspeicherplatzes. Das Maximum sind 3145728 Bytes.
Globale Variablen verwenden 50692 Bytes (15%) des dynamischen Speichers, 276988 Bytes für lokale Variablen verbleiben. Das Maximum sind 327680 Bytes.
esptool.py v2.6-beta1
Serial port COM9
Connecting…….
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: cc:50:e3:b6:e5:90
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47…
Writing at 0x0000e000… (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4096.1 kbit/s)…
Hash of data verified.
Compressed 17664 bytes to 11528…
Writing at 0x00001000… (100 %)
Wrote 17664 bytes (11528 compressed) at 0x00001000 in 1.0 seconds (effective 138.4 kbit/s)…
Hash of data verified.
Compressed 2233680 bytes to 1788374…
Wrote 2233680 bytes (1788374 compressed) at 0x00010000 in 158.5 seconds (effective 112.7 kbit/s)…
Hash of data verified.
Compressed 3072 bytes to 134…
Writing at 0x00008000… (100 %)
Wrote 3072 bytes (134 compressed) at 0x00008000 in 0.0 seconds (effective 768.0 kbit/s)…
Hash of data verified.
Leaving…
Hard resetting via RTS pin…
Hi.
It seems that your code was uploaded successfully.
Make sure you open the serial monitor at a baud rate of 115200, so that you can see the text on the serial monitor.
After uploading the code, you should disconnect GPIO from GND. Open the Serial monitor, and then press the ESP on-board reset button.
Please make sure you’ve inserted the right network credentials.
Can you access the web server when you insert the IP address on your browser?
Regards,
Sara
Dear Sara,
may I ask you please to advise on the issue below.
I purchased an AI Thinker, but it is not printed on the chip.
This product contains the OV2640 Camera Module.
Can you please advise on which Camera Model to use?
The use of #define CAMERA_MODEL_AI_THINKER refers to the error. Also the other led to issues.
Thanks
Brownout detector was triggered
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
Hi Christian.
That’s probably a power issue.
Please read bullet 8 of our ESP32 troubleshooting guide: https://randomnerdtutorials.com/esp32-troubleshooting-guide/
Regards,
Sara
Check the camera pinout here: github.com/m5stack/m5stack-cam-psram/blob/master/README.md
I had to change pins 22 and 25 in camera_pins.h for the M5STACK_PSRAM
Hi!
I had same issue and that fixed but does not understand why.
if I set it like this:
#define CAMERA_MODEL_AI_THINKER
why should it g to the case:
#elif defined(CAMERA_MODEL_M5STACK_PSRAM)
???
Can you explain?
thanks!
Thank you very much for sharing. Using M5STACKcam I didn’t had image. After troubleshooting and comparing with other codes I changed setting for Y2_GPIO_NUM to 17. Now it works like a sharm using ESP32 DevModule with Huge APP for partition scheme.
Hi, Problem solved. Any ideas to improve the video quality?
Regards
I faced different problems getting the module working. Since I am using the 5V-supply pin (instead of the 3.3V on the CAMERA_MODEL_AI_THINKER) everything is OK.
Hi . I have an esp32-cam and i went throught all the process to program the board and everything was going fine . At the end i’ve got the message telling me the ip adress to connect my board so i did in my browser and i ‘ve got the viewer that appeared in the screen but but when i press start stream or get still i don’t have any image on the screen !
I tried with 2 boards and still the same problem . The only things in common is the software …
Any idea ?
Thanks .
Hello Patrick, unfortunately I can’t replicate that error on my end… The default CameraWebServer scripts works fine for me out of the box.
Regards,
Rui
See my post 20/-4/2019, maybe this will also solve your problem
Patrick,
I have the same problem. After I hit the “Start Stream” button, no image shown on the screen.
Have you resolved the problem ?
Regards,
Ong Kheok Chin
Hi Patrick,
I have the same problem. I have a windows machine using Windows 10. I think the problem might be in the windows firewall. My camera streams fine on my android phone. Maybe someone can help us setup the windows firewall. If I can get it figured out, i’ll let you know.
Hi, i’m stuck right at the beginning with Arduino IDE 1.8.9 I have to select the board before i see any ESP32 examples – chose ESP32 Wrover module, however examples do not include Camera – any ideas? Thanks
Hi Mike.
I’m sorry you’re facing that problem. I don’t know why that is happening. But you can try to download the example from our repository: https://github.com/RuiSantosdotme/arduino-esp32-CameraWebServer
Regards,
Sara
Just for anybody else having the same problem: Choose board ‘AI thinker ESP32-Cam’
Then in Examples go to “ESP32” and then “Camera”
After that you can alter the selected board again
update your ESP32 board driver version up to 1.0.2 or above .
Hello. Thanks for the tutorial – the camera is working
Nice tutorial, everything worked. Could you please show us how we can broadcast the video stream to the internet (so that we can see the video from any computer)? Maybe using port forwarding of the ESP32-cam or using a dedicated service? It would also be great to have an example working offline to record the video on a SD card (I haven’t managed to do that). Thanks!
Hi Oli.
At the moment, we don’t have any tutorial about that subject.
We’ve also been trying to use the SD card to save photos and record video, but at the moment, without success.
Regards,
Sara
Howdy Folks,
I am getting this major bug in my serial monitor after disconnecting the GPIO0 cable and resetting it:
Brownout detector was triggered
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
Guru Meditation Error: Core 0 panic’ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4012fea1 PS : 0x00060031 A0 : 0xca400000 A1 : 0x3ffe3ac0
A2 : 0x3ffaff7c A3 : 0x00000080 A4 : 0x3ffbf0ec A5 : 0x40090858
A6 : 0x02ffffff A7 : 0x00000c00 A8 : 0x4008f290 A9 : 0x3ffe3a90
A10 : 0x3ffbf0ec A11 : 0x000000fe A12 : 0x00000001 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x03000283 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace: 0x4012fea1:0x3ffe3ac0 0x4a3ffffd:0x3ffe3ae0 0x400dea6d:0x3ffe3ba0 0x400de992:0x3ffe3bc0 0x40083ec3:0x3ffe3bf0 0x400840f4:0x3ffe3c20 0x40078f2b:0x3ffe3c40 0x40078f91:0x3ffe3c70 0x40078f9c:0x3ffe3ca0 0x40079165:0x3ffe3cc0 0x400806da:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20
Rebooting…
unhandled.
Guru Meditation Error: Core 0 panic’ed (StoreProhibited). Exception was unhandled. {Note that are about 60 of these in my Log}
Guru Meditation E⸮ets Jun 8 2016 00:22:57
rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
Any Ideas?
Hello Kurt, here’s what the error: “Brownout detector was triggered” means:
When you open your Arduino IDE Serial monitor and the error message “Brownout detector was triggered” is constantly being printed over and over again. It means that there’s some sort of hardware problem.
It’s often related to one of the following issues:
– Poor quality USB cable;
– USB cable is too long;
– Board with some defect (bad solder joints);
– Bad computer USB port;
– Or not enough power provided by the computer USB port.
Solution: try a different shorter USB cable (with data wires), try a different computer USB port or use a USB hub with an external power supply.
Rui, I am using a USB CH340 and also a USB FTDI serial boards that connect directly to a Computer USB port, there are no cables, other than the Jumper wires. I have tried this on 3 different computers and about 3 to 4 USB ports on each one. I have also tested 2 CAM boards with the exact same results.
The Brownout is the only thing listed on my previous post, there’s also the:
“Guru Meditation Error: Core 0 panic’ed (StoreProhibited). Exception was unhandled. {Note that are about 60 of these in my Log}”
Which spawn 60 TO 100 Messages before it Reboots.
Hi.
Some of our readers reported that when they power the ESP32-CAM with 5V, they don’t have the brownout error or guru meditation error anymore.
Regards,
Sara
When I powered either one of them with 5V through the USB Serial dongle the LED on the ESP board lights up and stays on, while the Serial monitor shows nothing.
HI all,
I purchased a ESP32-Cam. I have had a lot of problems trying to get it to work.
I could nbot get the sketch to upload and a couple of other small issues.
What I found was (
Its all to do with the voltages…..
and the pin configuration is different on my usb-TTl compared to the pics on the web. ) –
1. Set the usb-TTl to 3.3V.
2. connect it to the ESP32-CAM as shown in all the diagrams, (but put the 3.3V from the usb-Tl to 3.3V on the ESP32-CAM.)
3. Strap the Io0 and gnd.
.. make sure the pins you have cables on are correct… very important.
4. Power up and upload the sketch.
Now to test the ESP32-CAM.
1. Remove the IO0 and gnd jumper.
2. Change the usb-TTl to 5v (changing the pin)
3. Change the voltage on the ESP32-CAM to 5V pin.
4. Power up.
5. Open up the serial monitor.
6. Press the reset button on the ESP32-CAM.
7. get the IP address.
Enter the IP address in your browser. Go to the bottom to Start streaming data.
And It works like a charm.
If I do not change the voltage on the pins (3.3v for uploading sketch and %v for operating then I could not get anything to work.
I hope this helps other people who are having Issues.
Wonderful tutorial, quick set up….I have 1 little issue…Stills OK, Steaming NOT OK…. Everything seems to work well and good but when I press Start Steam, nothing streams. I can tell through the Monitor, and TTL connection that the Steaming mode is going, and when I stop the monitoring shifts down to lower FPS. Still captures work just fine. Am I missing something? Do I need an SD card installed to allow streaming? Arduino 1.8.9, ESP32 Espressif v1.0.2
Hi.
You don’t need SD card to see the streaming.
I don’t known what can be the problem. Please note that you can only see the streaming on one client at a time. So, make sure that you don’t have any other browser tab making requests to the streaming URL.
I’m sorry that I can’t help much.
Regards,
Sara
I am facing the following error while uploading code. Please help
A fatal error occurred: Failed to connect to ESP32 cam: Timed out waiting for packet header
You probably don’t have the right connections to the FTDI programmer.
Also GPIO 0 needs to be connected to GND while uploading the code.
Regards,
Sara
hello, have you solved this error?
I edit code to use esp32 as accesspoint.
on serial monitor show:
IP address: 192.168.4.1
Starting web server on port: ’80’
Starting stream server on port: ’81’
Camera Ready! Use ‘http://192.168.4.1’ to connect
E (5687) wifi: addba response cb: ap bss deleted
Hi.
Unfortunately, I don’t know what that message means.
If you find out, please share with us.
Regards,
Sara
Hola a alguien le ha dado el siguiente error
[E][sccb.c:154] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x23, data:0x00, ret:-1
20:59:56.233 -> [E][camera.c:1215] camera_init(): Failed to set frame size
20:59:56.233 -> [E][camera.c:1270] esp_camera_init(): Camera init failed with error 0x20002
No se como solucionarlo, agradesco vuestra ayuda, saludos.
Hi Arturo.
Next time, post your questions in english so that everyone can understand.
Which camera board are you using?
Hello, sorry for my previous message in Spanish.
the problem is generated on a model plate ESP32-S Al-Thinker.
Hi ARturo.
That error you were referring to usually means that the camera is not properly connected or the ESP32 is not able to recognize the camera. That can be due to the following issues:
– Camera not connected properly: the camera has a tiny connector and you must ensure it’s connected in the the right away and with a secure fit, otherwise it will fail to establish a connection
– Not enough power through USB source: Some ESP32-CAM boards required 5V power supply to work properly. We’ve tested all our examples with 3.3V and they worked fine. However, some of our readers reported that this issue was fixed when they power the ESP32-CAM with 5V.
– Faulty FTDI programmer: Some readers also reported this problem was solved by replacing their actual FTDI programmer with this one: https://makeradvisor.com/tools/ftdi-programmer-board/
– The camera/connector is broken: If you get this error, it might also mean that your camera or the camera ribbon is broken. If that is the case, you may get a new OV2640 camera probe.
Also, sometimes, unplugging and plugging the FTDI programmer multiple times or restart the board multiple times, might solve the issue.
I hope this helps.
regards,
Sara
Hi I did everything as explained and if I get ip and I can enter and start the camera but when selecting the face dectector does not work does not happen nothing does not detect the faces, I have remained still to see if it detects the face and does not work , esp32 I have it connected to the 5v pin because when I tried it with 3.3v I did not want to load the code
I had the same problem and the camera needs to be in good lighting conditions to get it to do any of the recognition functions…….
hello I did everything as established, I charge the code and it gives me the ip and the entry in my browser and if it enters the platform of the camera and I can start the camera only that when selecting for the face detector it does not work I have been still to see if it detects but nothing appears, and if you notice that the quality of the camera is somewhat low and I do not know if that could be the cause, there is no way to turn on the led that includes the esp32 cam to work as flash
Hi Jesus.
What is the camera module that you’re using?
If the camera board doens’t have PSRAM, it won’t be able to do face recognition and detection.
Regards,
Sara
hello i have esp32-s Ai thinker PSRAM IPS6404LSQ
The face recognition and detection should work with that camera.
Did you follow Neil suggestions?
You really need to have good lighting, otherwise it won’t be able to recognize faces.
Regards,
Sara
Hello! Excellent tutorial, got me started real easy with the ESP32-Cam. I did got a bit stuck though:
– First time I uploaded the CameraWebServer sample sketch, the upload process worked fine, though I could not see any traces back in the serial, even removing the GPIO 0 to GND jumper and resetting.
– Then I tried to upload *again* and got only an error back:
esptool.py v2.6
Serial port COM5
Connecting…….._____….._____….._____….._____….._____….._____….._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for
packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
– Since I had a second ESP32-CAM, I repeated the steps above, and the results were the same: first upload from the IDE succeeded, the next one failed with the error above.
– I did try to change the upload speed to 115200 bps, but it did not change the results
– I did not (yet) try pressing the ‘reset’ button in the board, because it is in the back side and I have the module in a protoboard. Since the first upload worked without pressing reset, I’m not sure I need to do it this time, but I’m open for suggestions
Thoughts?
*Update*: it was indeed the ‘reset’ button underneath; if anyone is facing the same problem, just remember to briefly hit the reset button as you’re about to upload the compiled firmware.
Everything is working fine here now, thanks again for this nice tutorial.
Hi Claudio,
Yes, you need to press the reset button, otherwise you won’t be able to upload code.
Regards,
Sara
Hi, I want to thank you for all your articles, I learned a lot on this site.
Following this tutorial my ESP32 Cam worked the first try.
Now the part where I have some problems: I would like to connect some device through I2C like a BME280, a stepper motor and 2 relay but I have some difficult to locate the right pins (if available).
Could you help me?
TIA,
Vince
Hi Vince.
If you intend to use the SD card, there aren’t pins left (at least accessible pins).
If you don’t use the SD card, there are some pins available, but I haven’t experimented with those yet.
You can see the datasheet to check the internal connections to the pins: https://loboris.eu/ESP32/ESP32-CAM%20Product%20Specification.pdf (page 4)
You can see the pinout here: https://randomnerdtutorials.com/wp-content/uploads/2019/03/ESP32-CAM-pinout-1.png
I hope this helps.
Regards,
Sara
Thank you for your reply.
My need is to understand how many pins are left unused.
It seems that GPIO0..4 and 12..16 are already used by the cam
so no other device could be used.
Maybe some other GPIO could be used connecting directly to ESP32 pins.
Regrds,
Vince
Hi again.
GPIO16, GPIO 2 and GPIO 3 are not being used by the camera.
However, GPIO 2 and GPIO 3 are used for serial communication. But you can try with those.
Regards,
Sara
I have 2 boards and cams and with both i have the same problem:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
……………………………………………………….
I get endless dots , that’s it. Camera does not init. If I remove the cams from the boards that is detected and an error is printed.
Hi Mirko.
That usually happens when people forget to insert their network credentials or don’t insert the credentials properly.
Please make sure that you’ve inserted your network credentials and double-check that they’re correct.
Also, make sure that the ESP is relatively close to your router so that it is able to catch Wi-Fi signal.
Some readers reported that powering the ESP32-CAM board with 5V solved the problem.
Regards,
Sara
Thank you. That solved the problem.
I was always thinking the ESP32 is opening up a own WiFi hotspot and so inserted credentials for that.
I did not realize that it wants to connect to my Wifi and needs that credentials.
I did not even think about that, because I thought that the ……. is a part of the camera initialisation
So again, thanx for the hint.
Mirko
hello I still have the same problem that facial recognition does not work when I start it in the arduino ide serial monitor I start marking this
MJPG: 8205B 209ms (4.8fps), AVG: 210ms (4.8fps), 134+61+0+0=196 0
MJPG: 8220B 208ms (4.8fps), AVG: 210ms (4.8fps), 133+61+0+0=195 0
MJPG: 8234B 207ms (4.8fps), AVG: 210ms (4.8fps), 133+61+0+0=195 0
MJPG: 8253B 208ms (4.8fps), AVG: 210ms (4.8fps), 133+61+0+0=195 0
MJPG: 8258B 239ms (4.2fps), AVG: 211ms (4.7fps), 136+62+0+0=198 0
MJPG: 8244B 282ms (3.5fps), AVG: 215ms (4.7fps), 134+62+0+0=196 0
but nothing appears in the view of the camera and if I give it in enrroll face sometimes I throw this error
Guru Meditation Error: Core 0 panic’ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x40132f33 PS : 0x00060c30 A0 : 0x801333fb A1 : 0x3ffd5090
A2 : 0x3ffc73fc A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000008 A7 : 0x00600002 A8 : 0x80132ea4 A9 : 0x3ffd5070
A10 : 0x00000000 A11 : 0x0000000b A12 : 0x00000005 A13 : 0x00000020
A14 : 0x00000020 A15 : 0x3ffbe140 SAR : 0x00000020 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000001 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace: 0x40132f33:0x3ffd5090 0x401333f8:0x3ffd50c0 0x401334a0:0x3ffd50f0 0x40133755:0x3ffd5120 0x40094c89:0x3ffd5150 0x4008dae1:0x3ffd5190
It is also worth to say, that powering the Unit just from the Serial Converter leads to problems (at me) because the Module needs more/quicker Power than my Serial-Converter Module is able to deliver as you can see sometimes on the Serial-Monitor if there is “Brownout Detection …..”
I just power it from any other “good” Source to work against the “inrush current” that the Module aparently needs to kick in with WiFi.
Hello, thank you for posting this material, it is very explanatory. I would like to report a problem with the ESP32-CAM I’m using. The image was stuck and locked. So I switched the voltage to 5V and now it works fine. Thank you
Hi Tiago.
Thanks for sharing.
We now have a troubleshooting guide with the most common problems and how to fix them: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Hi guys. Thanks a lot for this tutorial. I’m using the esp32-cam without problems. The only question i have for you is: is there any way to rotate the image in 90º?
Thanks again!
Hello,
I am having trouble with my diymore esp32 cam. I believe it is a dev module so this is what I pick under boards (there is nothing that says diymore). I am getting connection timeouts using my adafruit programmer friend wired up the same way as the diagram. Using 3v3. Any suggestions?
Hi David.
Can you try powering your board through the 5V pin and see if it solves the problem?
Regards,
Sara
I was able to get my sketch uploaded to the DIY more board using 3v and 40mhz. The 5v to run the sketch
Thanks for sharing.
Has anyone had any luck in integrating this tutorial with MQTT? I’d like to be able to publish a notification via MQTT to a topic when a recognised face is detected so I can integrate this with my Home Automation System – Thanks
Hi Jonathan.
We intend to work on something like that in the future. But at the moment we haven’t experimented with it yet.
Meanwhile you can take a look at our MQTT tutorial: https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/
Regards,
Sara
Thanks for your post! i´m from Brazil and i trying using a board ESP32CAM of DiyMore but its no work…my first projeto with ESP32CAM was a AI-Thinker and works fine…
But when i using ESP32CAM DiyMore not work.
Maybe ESP32CAM DiyMore its a difrent pinout?
Hi Stefano.
I have no idea why one works and the other doesn’t.
Some users reported that some boards required 5V to operate.
That can be the case.
You can also take a look at our troubleshooting guide and see if it helps: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
my problem as that :
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
any solutions pleaseee , thanks
Hi.
Please check our troubleshooting guide, bullet 1: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
I hope this helps
Regards,
Sara
Hi!
can you help me how to modify code to push stream to my public proxy url on the internet?
I want to make a page which accessible publicly and don’t want to have public ip for my local network. so needs esp to stream to my proxy url itself
Hello,
My board is behaving little strange. Did anybody have this kind of message:
sptool.py v2.6
Serial port /dev/ttyUSB0
Connecting….
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: cc:50:e3:b6:db:fc
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 921600
Changed.
Configuring flash size…
Warning: Could not auto-detect Flash size (FlashID=0x0, SizeID=0x0), defaulting to 4MB
Compressed 8192 bytes to 47…
Writing at 0x0000e000… (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4134.8 kbit/s)…
A fatal error occurred: Timed out waiting for packet header
A fatal error occurred: Timed out waiting for packet header
Best Regards,
Milan
Hi Milan.
That errors means that your ESP32-CAM is not in flashing mode.
Please read our troublehsooting guide bullet 1: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
I hope this helps.
Regards,
Sara
Hi Guys !
Thanks very much for this tutorial !!, pretty straight forward and concise.
I’ve got my cameras from Aliexpress, they look very much alike to AI’s one. DM instead of AI is the brand that appears on the rfshield.
I’ve got a Raspberry Pi to serve as a WiFi HotSpot, assign the same IP to the ESP’s MAC address and from my mobile accessing the streaming.
A bonus: Checking the schematics, I saw that it operates with 3.3v, so the 5v go to a LM1117-3.3v voltage regulator, and this 3.3v regulator is rated up to 15V input !!!. Long story short, I’ve cramped 4 AAA batteries (6v) and the ESP32-CAM inside a GoPro-like waterproof enclosure and VOILA !!!.. .it worked… Underwater. at least surrounded by 3 ft of water :-). I had to lower the res down to 320×240 to keep the 23fps but still
Guys, you’re awesome !.
thanks again
Gabriel
Hi Gabriel.
That’s awesome! Thank you for sharing your project!
It would be great if you could send us some photos of your setup as well as how the images look underwater.
Use our contact page and just say that you want to send your photos: https://randomnerdtutorials.com/contact/
Regards,
Sara
Hi, Excellent Tutorial, but I can start the camera only that when selecting for the face detector it does not work. some Idea? thank. I use 5V/2A, the image is very good, I use 320×240, and I use ESP32 CAM-module, this: https://loboris.eu/ESP32/ESP32-CAM%20Product%20Specification.pdf , but face detector dont work. thank you.
Hi fabian.
The example should work with your board.
To be able to get face recognition, you should have good lighting conditions so that it can detect the faces.
Without further information, it is very difficult to understand what might be the issue.
You can also take a look at our troubleshooting guide and see if it helps in some way: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
it is my understanding that face recognition does not work in the 1.02 core of the ESP32. It does work in the 1.01 core.
If you revert back to the 1.01 core, make sure you also use the Camera example that comes with that core
For this problem:
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
solution apply 5V to the card, to the 5v pin
Hi Leo.
Thanks for sharing that tip.
We’ve made a compilation with the most common problems and how to fix them: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
And that is included in our guide.
Regards,
Sara
Hi, mine won’t detect faces for some reason. Do you have to install a MicroSD card for facial recognition?
Hi Trevor.
No, you don’t need to install a microSD card.
Regards,
Sara
hello,
Am having the issues of camera not supported
Hi Sunny.
Please read our troubleshooting guide and see if it helps:https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
can i access it from internet any where in the world?
You would need to create a secure tunnel to your home network or setup router port forwarding.
Is there any other way without port forwarding? I need some help about this . Can u help me about this?
hello rajesh
Did you find a solution?
Can I send images from ESP 32 CAM to smartphone via bluetooth or USB so that I don’t have to connect to a network?
It’s possible, but I don’t have any tutorials on that exact subject at the moment.
Can you suggest where I should start in order to send image from ESP 32 CAM to smartphone via bluetooth or USB?
Is there any other way without port forwarding? I need some help about this . Can u help me about this?
Hello Rui and Sara,
there is a litte led on the board. Do you know if it is possible to put it ON via gpio ? The camera will be installed in birdhouse (almost dark) and I woul’d like to have a little bit more light inside. Otherwise I wil use other ports to lit external leds.
Thank you for your great job and in advance for your answer.
Hi Bernard.
The LED is connected to GPIO 4.
So, you just need to make the usual procedures to put a GPIO on.
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);
Regards,
Sara
Thanks a lot, but this little led have not enough power to give good light.
I used extra leds strips to do the job via a wemos d1.
Regards,
Bernard
Hi Bernard.
Yes, that LED is not enough for a good light.
That’s a good idea.
Thank you for sharing.
Regards,
Sara
Hi everyone.
Nice tutorial you’ve got here.
I’m working on a door security system that would require a cam to take a picture of a face, compare it with already registered images on a database and have it trigger a lock mechanism on successfull validation. (without streaming or accessing via wifi.)
Would this be possible with esp32 cam?
Thanks.
hello, i’m working on this too. Did you manage this? I will be glad if you answer.
Hello everyone,
Can any one help i am getting following error while uploading the code.
Arduino: 1.8.9 (Windows 10), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA), QIO, 80MHz, 921600, None”
Sketch uses 2241942 bytes (71%) of program storage space. Maximum is 3145728 bytes.
Global variables use 52696 bytes (16%) of dynamic memory, leaving 274984 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM8
Connecting…..
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:0a:c4:bb:65:c4
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 921600
Changed.
Configuring flash size…
Warning: Could not auto-detect Flash size (FlashID=0x0, SizeID=0x0), defaulting to 4MB
Compressed 8192 bytes to 47…
Writing at 0x0000e000… (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4369.0 kbit/s)…
A fatal error occurred: Timed out waiting for packet header
A fatal error occurred: Timed out waiting for packet header
Hi.
It seems that your board is not in flashing mode, so it is not able to upload the code.
Please take a look at our troubleshooting guide, bullet 1: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
I hope this helps.
Regards,
Sara
Hello, your site and your instructions are amazing,i believe that i do everything like you said in the video but it stops at this point. It doesent show me that it connects to the internet,i tried either with an antenna or without one. Please help me get through this if you can
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
Hi Ilias.
Please take a look at our troubleshooting guide and see if it helps: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Hi guys…
i have tired facing this problem.can you anyone please help me for solving this problem. I have got espressif ESP32-CAM two module. but i am unable to connect Camera,and i did not get any IP address with this module.
thanks in advanced
manu
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
Camera init failed with error 0x20004ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
Camera init failed with error 0x20004
Hi.
Please take a look at our ESP32-CAM troubleshooting guide and see if it helps: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Hi Sara Santos. In a comment from may you mention that you have tried taking photos and saving them to the SD card, but failed. I managed to do this. Do you want me to dig out the code and show it to you?
I also managed to take photos when an “intruder” is detected from a sensor. The only problem with that is that I did not manage to connect the sensor directly to the camera module. I had to use an auxiliary Arduino board with the sensor, and make it then send a command to the ESP32 module to make it take a picture. I am pretty sure there are much better ways of doing this, ideally without needing an arduino board.
Hi Antonio.
Thank you so much for taking the time to read and answer to our comments.
Actually, one of our readers also shared a solution for that, and we end up writing a new tutorial about it.
Here is the tutorial: https://randomnerdtutorials.com/esp32-cam-pir-motion-detector-photo-capture/
Regards,
Sara
Hi all.
On a DIYMore Esp32-cam all I get from Arduino is
board esp32 (platform esp32 package esp32) is unknown
I installed the Esp32 addon, and tryed all the Esp32 boards on Arduino with the same result.
I am missing something, I am sure..
Thanks!!!!
Hi Federico.
I’ve never faced that issue.
I’ve found this discussion: github.com/espressif/arduino-esp32/issues/2388
See if some of the suggestions can help with your issue.
Regards,
Sara
Hi Sara!
Solved by removing all the esp32 stuff and reinstalling.
Thanks!!!
Have a nice WE!!!
Federico
Hi All,
Nice Tutorial !!! Have not seen this issue posted anywhere. So here Goes:
Followed tutorial, all worked perfectly until ESP32-Cam was removed from power. Then it acted like it had never been Flashed when power was restored. Even tried RST button, nothing shows up in the Serial Monitor. Can set back up to Flash and all goes well (all works) until power is removed then restored, again acts like it had never been Flashed. Bought 2 of these and both act the exact same way. Any help would be great. Thank You in Advance !!!
CharlieBob
Did you remove GPIO 0 from GND? If you leave that connection, the ESP32-CAM starts in FLASHING mode and it will not run your code…
Hi Sara
I connect esp32 cam with Lora but it cann’t be initiatized.
It seems that deinit(); of the esp32_cam doesn’t work as commented in esp32_camera.h. Please kindly suggest how to coexist cam and lora on this esp32_cam module.
Many thanks, PP
Hi PP.
Most of the GPIOs exposed on the ESP32-CAM are either being used by the camera or by the microSD card.
So, it will be very difficult to interface a LoRa module with this board.
Regards,
Sara
Hi,
Where i should buy this product? I am living in Denmark. I could not find suppliers for this product in my contry.
Kind regards
Salam
Hi Salam.
I have no idea.
We usually buy our electronics components and boards from stores like eBay, Banggood, Aliexpress, Amazon, etc…
https://makeradvisor.com/tools/esp32-cam/
Regards
Sara
i can’t run esp32cam, i tried to define all modules and nothing, help. My module has nothing written on the board, what manufacturer it is, how to detect what module it is
What error do you get? Or you don’t get any error at all?
How can I turn on the flash? I tried with “digitalWrite(4, HIGH)” but It doesn’t work.
Hi.
That should light up the flash. Have you defined the pin as an output?
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);
Regards,
Sara
Oups, you’re right, I forgot setting the pin as output jejeje It’s been a long time since the last time I used an Arduino …
How can i iuse that URL on other network? i want to access that camera on my mobile network, how can i do that???? please answer..
You’ll need to do some router port forwarding. Search for “router port forwarding” and you’ll find how to make a web server accessible from anywhere.
hello omkar
Did you find a solution?
Arduino IDE 1.8.10
The hardware (ESP, USB serial etc.) is the same as yours.
Linux Mint (Xfce)
I followed each and every step and this is what I get:
Arduino: 1.8.10 (Linux), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA), QIO, 80MHz, 921600, None”
Traceback (most recent call last):
File “/home/swift/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py”, line 37, in
import serial
ImportError: No module named serial
Multiple libraries were found for “WiFi.h”
Used: /home/swift/.arduino15/packages/esp32/hardware/esp32/1.0.3/libraries/WiFi
Not used: /opt/arduino-1.8.10/libraries/WiFi
exit status 1
Error compiling for board ESP32 Wrover Module.
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
I’ve installed “pyserial” and I don’t get the error “No module named serial” but I get this:
Arduino: 1.8.10 (Linux), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA), QIO, 80MHz, 921600, None”
Sketch uses 2097154 bytes (66%) of program storage space. Maximum is 3145728 bytes.
Global variables use 53516 bytes (16%) of dynamic memory, leaving 274164 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Traceback (most recent call last):
File “/home/swift/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py”, line 2959, in
_main()
File “/home/swift/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py”, line 2952, in _main
main()
File “/home/swift/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py”, line 2652, in main
esp = chip_class(each_port, initial_baud, args.trace)
File “/home/swift/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py”, line 222, in __init__
Serial port /dev/ttyUSB0
self._port = serial.serial_for_url(port)
File “/home/swift/.local/lib/python2.7/site-packages/serial/__init__.py”, line 88, in serial_for_url
instance.open()
File “/home/swift/.local/lib/python2.7/site-packages/serial/serialposix.py”, line 268, in open
raise SerialException(msg.errno, “could not open port {}: {}”.format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: ‘/dev/ttyUSB0’
An error occurred while uploading the sketch
When I run python -m serial.tools.list_ports in terminal I get this:
/dev/ttyUSB0
1 ports found
Just simply run it as root and it worked. Now I’ve got a problem with Brownout detector but nothing seems to be working :/
The FTDI programmer wasn’t able to supply 3,3V (only 2,7V), and 5V seemed to be too much for the ESP32. Now it works.
The dl_lib.h is related to the face recognition capabilities 2 (esp-face), and it was removed in version 1.0.3 of the Arduino core. That said, just comment it out and it should compile and work perfectly either if you are using the Arduino IDE. Other option is to revert to version 1.0.2 of the arduino core.
Regards
Sorry, but how do you comment it out for version1.0.3 and above
In app_httpd.cpp
#include “fb_gfx.h”
#include “fd_forward.h”
//#include “dl_lib.h”
#include “fr_forward.h”
Hi, open the webserver, but I press the “start stream” button and the failure to open the image, this message appears in serial ,, …… already tried in 3 browsers, can anyone help me?
[E][camera.c:1344] esp_camera_fb_get(): Failed to get the frame on time!
Camera capture failed
Raphael i added a solution over in https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide, but here it is in case you dont see it…
A solution to the “esp_camera_fb_get(): Failed to get the frame on time!” message….
Im using the ESP32-CAM Module 2MP OV2640 Camera sensor Module Type-C USB module from Aliexpress. Although not mentioned It doesn’t have the extra PSRAM the other M5 models do AND the camera has one changed IO pin. See here… https://github.com/m5stack/m5stack-cam-psram/blob/master/README.md and scroll down to Interface Comparison. The CameraWebServer Arduino example we’re probably all using doesnt have this ESP32-CAM model defined. You need to add it yourself eg in the main tab add #define CAMERA_MODEL_M5STACK_NO_PSRAM , and in the camera_pins.h tab add…
#elif defined(CAMERA_MODEL_M5STACK_NO_PSRAM)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 17
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
And you’re good to go.
Also note that the max resolution of the bare ESP32-CAM Module is XGA1024x768 i assume also because of the lack of PSRAM.
Thanks for sharing that.
We need to add this to the troubleshooting guide.
REgards,
Sara
Hello Sara and Rui.
Tried the Esp32 camera for the first time today.
Sketch upload is only possible with 5 Volts.
Also works very nicely and reliably.
Thank you for your work.
Greetings from the Netherlands from Bert.
https://www.youtube.com/user/nuonnuon?gl=NL&hl=nl&app=desktop
hello Sara and Rui ….
i m finished this beautiful project.Everything working well but when i forwarding port and conect camera via internet,GET STLL working but VIDEO STREAM not ,maybe you know whats the problem ???
thanks in advance ,73 de 9a3xz Mikele Croatia
Hi Mikele.
I don’t know what can be the problem.
In this example, video streaming only works on one client at a time. This means that if you have the web server opened in another tab, it will not work. Just one tab at a time.
Thanks for following our work.
Regards,
Sara
Hi again. Great turtorial again. My Hiletgo ESP32-Cam runs as a Ai-thinker. Noticed the image is mirror image (reversed right to left). Module design should have had the reset button on the camera’s side or a reset pin available. so it can work in a breadboard.
Is it possible for facial recognition to send a signal to turn on a servo / LED? depending if it is intruder or subject
Hi.
Yes, it is possible.
However, at the moment, we don’t have any tutorial about that.
Regards,
Sara
Hi Sara,
I am getting below error, please help…!
Sketch uses 2100647 bytes (66%) of program storage space. Maximum is 3145728 bytes.
Global variables use 53552 bytes (16%) of dynamic memory, leaving 274128 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM12
Connecting….
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:6f:28:46:97:64
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Warning: Could not auto-detect Flash size (FlashID=0x0, SizeID=0x0), defaulting to 4MB
Compressed 8192 bytes to 47…
Writing at 0x0000e000… (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 5041.2 kbit/s)…
A fatal error occurred: Timed out waiting for packet header
A fatal error occurred: Timed out waiting for packet header
Hi Ravi.
Read our troubleshooting guide, bullet 1:https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Just received my ESP32-CAM Ai-Thinker board. Everything works fine except no ‘Toggle settings’ pane on the webpage. Perhaps I received a hacked firmware in mine or did I do something wrong?
I’ve backed up the firmware with esptool. Does anyone have a .bin file from a board that shows the toggle settings pane?
Thanks Rui and Sara for your work.
I installed esp-idf and esp-who (https://github.com/espressif/esp-who), then built the example code ‘camera web server’ demo. I now have the settings pane.
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
[E][sccb.c:154] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:263
[E][sccb.c:154] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x12, data:0x80, ret:263
[E][sccb.c:119] SCCB_Read(): SCCB_Read Failed addr:0x30, reg:0x0a, data:0x00, ret:263
[E][sccb.c:119] SCCB_Read(): SCCB_Read Failed addr:0x30, reg:0x0b, data:0x00, ret:263
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
I get this error, any solution?
Hi.
The 0x2004 error means the camera is not supported.
On your camera ribbon, which label do you have? Ours is LA AF2569 0927XA
What label do you have in your camera model?
Regards,
Sara
my camera is OV2640.
Hi Sara,
I have two ESP32-CAM, both of then was working perfectly untill some time ago.
Now, everytime that I upload a sketch to the modules, I get the this error message which is recurrently appearing here:
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
I don’t know what is going on, because it happens in my two ESP32-CAM modules and they were working perfectly here in the last time I used then.
The labels n the ribbon cable in both OV2560 cameras are:
XRZ00D1 -V240 V2.0 1903
Any ideas?
Hello. The image disappears or freezes after 2 seconds. What may be failing ???
Hi Antonio.
It may be the Wi.Fi signal.
Are you using the on-board antenna or an external antenna.
If you’re using the on-board antenna, you need to be close to your router. The best way is to have an external antenna.
Regards,
Sara
Hi Sara,
I cannot get the IP address.
Here is what I am getting at 115200.
I moved close to the router, and added an external antenna.
Please help.
I had a similar problem.
The fact that you get occasional words suggests that the baud rate is right.
I forget which problems that I had were solved by what, but I started out powering the module on the Vin pin and having a power line connected from the TTL and I ended up cutting all the power lines to the TTL and powering the module on the 5V pin.
Cancel that.
I can upload by using on 5V only.
Hi Antonio,
Thanks for this example. I would want to know how to capture and send a base64 encoded image to external server.
Hey. Have you tried this camera as an IP cam (softcam)? With own name and IP address? I tried a sketch but I don’t get a video image but also no ip address provided via the Serial monitor. This sketch is in IDE. Do you know him?
Greetings (old) Bert
Thanks, worked like a charm.
Bought 4 of these clones for 15€, took me 10 minutes to set all of them up.
Hello Mr Rui Santos
Iam using in Example Arduino IDE – CameraWebServer
Camera OV2640 – stack with high resolution
camera resolution UXGA (1280 x 1024)
Please select CIF or lower resolution before enabling this feature!
then when iam try to get low resolution QVGA (320 x 240)
face detection and face recognition done
1. how to make camera OV2640 with high resolution using face detection and face recognition ?
when iam opnened the web IP Adress ESP32 Cam – button get still
then iam check on program i cant find the button is
2. how to make button “Get Still” – save to SD Card ?
then the code checked the image when false detected 0
3. how to read the image then checked the image scan detected=true ?
like this web, when camera detect (show on micro SD Card – intruder alert)
Hi.
I’m sorry but I don’t have answers to all your questions.
I recommend taking a look at all our ESP32-CAM projects and see if you find something that you can modify to use in your own projects.
See all the projects here: https://randomnerdtutorials.com/category/esp32-cam/
Regards,
Sara
Hi, thanks for your tutorial.
I followed all the steps above and get the ip address, but when I did it on browser it just can’t be reached.
Whats going wrong? I have no idea whats happened.
Hi.
Does your ESP32-CAM have an external antenna?
Or are you close to your router?
If you don’t have an external antenna, the ESP32-CAM needs to be close to your router, so that it is able to catch the wi-fi signal.
Read the section about the antenna “7. Weak Wi-Fi Signal” on our troubleshooting guide: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Is it necessary to connect to the ESP32 Cam using the FTDI Programmer? I have a USB/TLS cable, meaning one side is USB, and on the other are red (VCC) , black (gnd), white (TX), and green (RX) which I use frequently to connect upload to ESP8266 w/o the FTDI programmer.
With the ESP32 Cam I tried connecting the USB/TLS cables as follows:
Red > VCC
Black > Gnd
White > U0T
Green > U0R
No luck yet: there’s still the issue of getting the ESP32 into bootloader mode.
There’s the Reset button, but I’m used the the ESP32 and ESP8266 where you need two buttons
I’ve read you can get ESP into bootloader mode by grounding certain pins.
Overall the question is: Can I flash the the ESP32 Cam using a USB/TLS?
Answering my own question: ESP32 Cam can be flashed without the FTDI Programmer using a USB/TLS cable wiring as described above with one change:
Red > 5V (Thanks to RandomNerdTutorial diagram above / link below)
Black > Gnd
White > U0T
Green > U0R
Getting into Boot mode, thanks to the same diagram was about grounding GPIO0, taping Reset, then releasing GPIO0.
Great tutorial!
Diagram mentioned: https://i1.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/12/ESP32-CAM-FTDI-programmer-5V-supply.png?w=750&ssl=1
Hi.
That’s right! It doesn’t have to be an FTDI programmer. It can be a USB/TLS cable, as long as you have the right wiring.
Regards,
Sara
Hey Sara i want Arduino to take pictures when i am out for walks for example and send them to a web server do you think this is possible?
Hi John.
Take a look at this tutorial: https://randomnerdtutorials.com/esp32-cam-take-photo-display-web-server/
Regards,
Sara
Hey Sara and Rui in this example how you connect the ftdi programmer with the computer ?
Hi.
The FTDI programmer we’re using has a mini-USB port. So, we just connect a mini-USB to USB cable to the FTDI programmer and then to the computer.
Regards,
Sara
Hellow sara santos
I have problem can you help me please that when I connected esp32 with my arduino and upload the code from arduino ide to arduino and it uploaded but when I opened the serial monitor that the IP address not appear that write camera_probe(): detected camera not supported
esp_camera_init(): camera probe failed with error 0×20004
So ,I can’t solved this problem can any one help me please …
Hi.
Please take a look at our troubleshooting guide.
I’m sure it will help: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Hello i have the ftdi i have the esp32-cam and females jumper wires my problem is how to i connect the ftdi programmer with my pc ?
Hi Sara,
After uploading the file [CameraWebServer] to the ESP32-CAM board, the following message is shown on the Serial Monitor.
After the ESP32-CAM IP address is typed on the browser, no any video. Pressing the Start Streaming button, also no video .
I try it on Win10 & Win7 machine, same!
I follow all your steps; AI Thinker board and ‘CAMERA_MODEL_AI_THINKER’ in the file are chosen. How to solve it ?
message on Serial Monitor: (an SC card is inserted)
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
[E][sccb.c:154] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0x91, data:0xa3, ret:-1
[E][sccb.c:154] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0xff, data:0x00, ret:263
[E][sccb.c:154] SCCB_Write(): SCCB_Write Failed addr:0x30, reg:0xff, data:0x01, ret:-1
.
WiFi connected
Starting web server on port: ’80’
Starting stream server on port: ’81’
Camera Ready! Use ‘http://192.168.1.110’ to connect
Hello.
I recently started using this ESP32cam programmer.
This works a lot better and faster than the loose wires.
I have no connection with this company.
https://www.tindie.com/products/bitluni/cam-prog/
Greetings Bert.
Hello.
When I Verify/Compile I get this space error. I’ve not even connected my ESP32.
Sketch uses 2053883 bytes (156%) of program storage space. Maximum is 1310720 bytes.
Your trouble shooting mentions (for a space different error)
Tools > Partition Scheme, select “Huge APP (3MB No OTA)“.
but I don’t have this in Tools.
I’m using IDE 1.8.12
Thanks.
Solved: I uninstalled the board and reinstalled it and this time I saw Huge APP… and it has now compiled.
Thanks for the good tutorial, very helpful!
I read that the logic level for the ESP should be 3.3 V!
Not sure if you can fry your board with 5V logic levels.
I had success using a FT232RL USB to TTL Serial Converter, using 5V from the side to power the ESP with cam and having the jumper set to 3.3V for the logic levels.
Hi Thomas.
You are right that you should use 3.3V with the ESP32-CAM.
However, many of our readers had troubles when using 3.3V and those were solved when they used 5V instead.
We didn’t have any problems when using one option or the other.
Regards,
Sara
Hey. Have you tried this camera as an IP cam (softcam)? With own name and IP address? I tried a sketch but I don’t get a video image but also no ip address provided via the Serial monitor. This sketch is in IDE. Do you know him?
Greetings (old) Bert
Its stil not working, need help.
Dear Sir
very good work, it works for me, but the problem it is not saving recognized faces to microsd-card. Each time power on we have to start recognition again.
To make sure there is no problem with the microsd-card or the board I try this “https://randomnerdtutorials.com/esp32-cam-take-photo-save-microsd-card/” and it works and save photos to microsd-card.
So where is the problem ???
Hi.
This particular example doesn’t save faces on the microSD card.
Regards,
Sara
Ok
thanks for your concern, do you know any other code to save and read faces to microSD card ??
or web help to do that ??
Ok I need a small help ==> in web server I need to know where is reference to button “Start Stream” in code
Why ??? ===> I need to start Stream with Device Startup without clicking on “Start Stream” button
How to do this ??
TRY putting
http://ipaddress:port/stream
ipaddress –> Your IP ADDRESS
port –> Stream port which is normally 81
Hi,
the installation went fine and when I enter the IP address (in chrome) I had video; also the integration with Home assistant went smoothly – so far so good.
I however don’t have the “camera streaming server” with the config buttons and sliders and I can figure out how to fix that.
Ideas / clues would be very appreciated.
Best Regards,
Ko (Netherlands, The Hague)
Just done with this project without any error. You people are doing great. Keep it up.
One issue my eap32 cam is getting heated (the esp 32 side) so much, can you suggest why it’s happening. I am supplying power directly from a 12000mah power bank.
Hi.
That can happen if the ESP32-CAM is continuously streaming, specially during face detection and recognition.
Regards,
Sara
Hi…
How can I use face recognition without wifi?
I mean: I’ld like to open/close a box with ESP32-CAM and Servo…
Maybe I’ll need sd-card of course…
Thanks and have a nice day.
Hi, thank you very much for your tutorials. My second project has been the the esp32 camera. Just for knowing: your tip of connecting GPIO0 to GND when flashing is very important and solved my problem of “fatal error…”
I would ask you if you have a tutorial for saving “faces” after a power loss, perhaps in your book?
Thanks
Hi Alberto.
That is not covered in our book.
Regards,
Sara
I encountered A HORRIBLE problem and would like to share it with you folks with a solution of course
Problem is:
If you notice every time we have to press the RESET (RST) button to start our ESP32 CAM so that your program works…Now what if for some reason the power to ESP32 CAM board goes down? And say in 5 mins the power is back ON to the board..
Will you go and press the RESET (RST) button over and over to get your program started ?
How to let your ESP32 CAM board auto reload (call setup() function) when powered on without having to press the RESET (RST) button to get your code up and running.
Answer:
After you upload your code on the ESP32 CAM board, connect the GND wire to the GND pin which is near the 5V pin of the board..Voila!!! This will solve your problem..
This seems like a hardware bug linked to C15 on the ESP32 board..
Hope this tip helps all folks…
Thanks for sharing.
Regards,
Sara
I have already tried this but the esp32cam remains unstable. Sometimes no signal if the power is oke, but only again after a reset. Too often after start-up a reset must be given first. I have no idea how to fix this. I have 3 cam’s with the same problems. The power supplies are stable 5 volts / 2 amp. (al thinker cam)
Hi.
Your problem may be the antenna.
Take a look at this article and see if it helps: https://randomnerdtutorials.com/esp32-cam-connect-external-antenna/
Regards,
Sara
Last weekend we discovered that our router was no longer working properly. There is a new one and now the ESP32cam problems are suddenly gone. We hadn’t thought of that yet.
Thanks for your comment.
Hi i reset my ESP32-CAM after uploading,but to show this error.
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
Hi.
Disconnect GPIO 0 from GND after uploading code and it should be work.
Regards,
Sara
I have had a lot of trouble programming some ESP32 cameras which are not on the list of cameras in the software.
I found that I can program those boards if I use an Arduino, instead of the FTDI cable. Doing this I can select the AI Thinker board. I have always had time outs when trying to use the FTDI cable.
I just wanted to mention this for anyone else who is having trouble with the programming cable method.
Hi Guys,
I have two ESP32-CAM, both of then was working perfectly untill some time ago.
Now, everytime that I upload a sketch to the modules, I get the this error message which is recurrently appearing here:
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
I don’t know what is going on, because it happens in my two ESP32-CAM modules and they were working perfectly here in the last time I used then.
The labels n the ribbon cable in both OV2560 cameras are:
XRZ00D1 -V240 V2.0 1903
I tested here my ESP32-CAM modules (conecting to the Wi-Fi, without initializing the camera) and they are working fine.
I tryed many things here, including powering the ESP32-CAM with an external 5V source, but nothing worked so far.
Is there any way to test if the camera is working (without the ESP32-CAM module)?
Any ideas?
Reply
Hi Sara. Your tutorials are awesome! Keep going.
I would like to know how to implement the same solution in this tutorial (and in this: https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/) but using micropython.
Can you help me?
Thanks in advance.
Best regards.
Hi.
Thanks for your comment.
Unfortunatley, at the moment, we don’t have any tutorials about the ESP32-CAM with MicroPython.
Regards,
Sara
Going to try this with Blynk. Can’t find ESP32 in my Arduino examples. Will try to update. I need an open GPpin Which one is open for use. Need to output HIGH and LOW. Don’t really care to store images only stream video.
Got the ESP32 installed so can see board and examples. Can I use this with Blynk do you think and is there on open GPIO?
Hi.
Unfortunately, we don’t have any examples with the Blynk app.
Thanks for your interest in our work.
Regards,
Sara
Are there any open GPIO pins I can use to set to OUTPUT HIGH or LOW?
Can a TFT display be connected to the ESP32 CAM to show Face Detection either instead of the web server, or both at the same time?
Hi.
It should be possible. The TTGO T-Camera Plus comes with an Example that displays the video streaming on the display: https://makeradvisor.com/ttgo-t-camera-plus-esp32-review-pinout/
However, we don’t have the code for that.
Regards,
Sara
Could this be connected to Windows (7/10/etc)? I mean, I know that it can set the WIFI config in order to attach to any newtwork but I don’t know if it could be detected for Windows as IP Cam without problems.
Hallo Sara, Rui,
Can camera OV5640 be included in the camera_index.h tab ?
Groeten, Regards
Tom
Hi.
This only works with OV2640 cameras.
Regards,
Sara
And it works with OV3660 . . .
Why not with OV5640 ?
Is there another sketch to start this camera ?
Would be nice if you could help me . . .
regards, Tom
Hi from Italt. I use your example and it works like a charme ut I don’t understand how the esp32 cam streams video. Do not exist an url to se video stream or to have a snapshot? the only solution is to press button from web server? that’s all? I need if possible a simple url for video strem and snapshot. Thanks so much from Italy
I answer myself: these are the two url i was searching for:
– video stream: http://192.168.0.74:81/stream
– snapshot: http://192.168.0.74:81/capture
Thanks so much
Hi Guys,
I have two ESP32-CAM, both of then was working perfectly untill some time ago.
Now, everytime that I upload a sketch to the modules, I get the this error message which is recurrently appearing here:
[E][camera.c:1049] camera_probe(): Detected camera not supported.
[E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
I don’t know what is going on, because it happens in my two ESP32-CAM modules and they were working perfectly here in the last time I used then.
The labels n the ribbon cable in both OV2560 cameras are:
XRZ00D1 -V240 V2.0 1903
I tested here my ESP32-CAM modules (conecting to the Wi-Fi, without initializing the camera) and they are working fine.
I tryed many things here, including powering the ESP32-CAM with an external 5V source, but nothing worked so far.
Is there any way to test if the camera is working (without the ESP32-CAM module)?
This camera is making me mad..
Any ideas?
Hi, this is cool project. Can we train the esp32cam so can detect face with mask and no mask?would be interisting if we can do with small board.
Hi.
We don’t have any tutorial for that project.
However, I’ve already seen some people doing it.
Regards,
Sara
Hi sara, thanks for reply. Could you please give the link of other people project. So I can learn from it.
Regards.
Hi.
I’m sorry, but I don’t have any links to show you.
I’ve seen someone doing it on Instagram, I think, using an ESP32-CAM.
However, with a quick search I couldn’t find any code. Probably, they haven’t shared the code online.
I’m sorry that I can’t help much.
Regards,
Sara
When it is all programmed and you are getting the control interface page but no video feed… do not forget to turn off NOSCRIPT in your browser
Hello sara,
nice work u done.
I want to use same camera but in offline mode, I don’t have internet connection, can this work.
Regards.
Hi.
Yes. You can set your camera as an access point. See this tutorial: https://randomnerdtutorials.com/esp32-cam-access-point-ap-web-server/
Regards,
Sara
Hi sara,
I want to use this module (camera) for one application, that will be use in environment where internet connection is not available, can camera use in without internet connection.
Regards.
Have you seen the new esp32cam motherboard which is being sold on eBay very cheaply (search for esp32cam mb”?
This is the only info. I have managed to find about it: hpcba.com/en/latest/source/DevelopmentBoard/HK-ESP32-CAM-MB.html
It makes using the esp32cam so much easier as it functions just like any other esp32 development board with no wires, linking pins, removing power etc..
The esp32cam does not have a reset pin and it seems the esp32cam supplied with the motherboard is a modified version where one of the GND pins has been changed to a reset when low pin despite still being labelled as GND.
You can still use it with other esp32cam boards but you have to connect power whilst holding the program button to upload code.
Mine will only work on slower serial upload speeds and the wifi signal is very poor whilst on the mother board (I am guessing this is why many of the suppliers offer the external antenna option) but well worth a look especially for first time users especially for the price.
Hi.
Thanks for the suggestion.
It can make uploading the code a much easier task.
Regards,
Sara
Dear Sara,
Your link doesn’t “work” . . . this one does !
aliexpress.com/i/1005001727033068.html
regards and Happy Save Holidays
Hello,
I have followed this tutorial multiple times using two separate board sets, but I continue to receive this message in the Serial Monitor window when pressing the RST button .
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
The compilation and uploading process appears to be successful;
Sketch uses 2100647 bytes (66%) of program storage space. Maximum is 3145728 bytes.
Global variables use 53552 bytes (16%) of dynamic memory, leaving 274128 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM4
Connecting….
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 10:52:1c:5d:94:4c
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47…
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4369.0 kbit/s)…
Hash of data verified.
Compressed 17392 bytes to 11186…
Wrote 17392 bytes (11186 compressed) at 0x00001000 in 0.3 seconds (effective 515.3 kbit/s)…
Hash of data verified.
Compressed 2100768 bytes to 1661717…
Wrote 2100768 bytes (1661717 compressed) at 0x00010000 in 39.8 seconds (effective 422.1 kbit/s)…
Hash of data verified.
Compressed 3072 bytes to 119…
Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.0 seconds (effective 1536.0 kbit/s)…
Hash of data verified.
Leaving…
Hard resetting via RTS pin…
Hopefully the problem is glaringly obvious and simple to correct!
Your help would be much appreciated.
Okay – I just remembered to remove the GND to IO0 jumper after programming – and the board runs.
compiles and loads, however when it attempts to start the following message appears;
“Invalid library found in C:\Users\Bruce\Documents\Arduino\hardware\espressif\esp32\libraries\AzureIoT: no headers files (.h) found in C:\Users\Bruce\Documents\Arduino\hardware\espressif\esp32\libraries\AzureIoT”
Sure enough, the AzureIoT folder is empty.
Your thoughts?
Hi!
I can’t find the FTDI programmer part in my country. Can i replace that part with arduino uno for example, or with something else?
Thanks for answering!
Hi.
Yes. You can do that.
Just search “Program ESP32-CAM using Arduino Uno”.
Regards,
Sara
hello,
very tempted by this device, I bought 3 ESP32-CAM
set up on my wifi on which I already have standard webcams.
The installation works, I get many images of a very honorable quality.
The problem is that the ESP32 heat up a lot and stop. So I can’t use them as 24/7 surveillance devices.
I tried to lower the resolution from SXGA, to XGA, then SVGA but it’s not satisfactory.
Am I the only one with this type of problem? Is there any way to stop these overheats?
Thank you for your feedback.
Running Arduino 1.8.12 on Windows and I don’t see what you specify below
CameraWebServer Example Code
In your Arduino IDE, go to File > Examples > ESP32 > Camera and open the CameraWebServer example
Olá
Tenho uma camara Ov2640 a funcionar num ESP32-CAM-MB
Tentei substituir por uma camara ov5640, pois tem mais definição.
Obtive erro: camara não compatível.
Há maneira de instar a camara ov5640 num ESP32-CAM-MB?
If anyone is having issues with the esp-32 CAM not coming out of sleep mode you have to change the 10K out for a smaller resistor size.
There are some errors not talked about though that I don’t know how to fix like Timeout waiting for VSYNC happens randomly which requires turning the whole system off and on.
Also one time my SD card was corrupted and I had to reformat it losing all the photos. Lastly the photos sometimes don’t come out right, like only the top of the photo comes in or the entire photo is unviewable. I think this issue may be caused by the camera going into sleep mode before the picture is done being taken though, so maybe increasing the delay time will fix it.
Hi,
ESP32-Cam is wonderful. It can be programmed with FTDI programmers of several kinds, however if I use an Arduino as a programmer (Tx to Tx and Rx to Rx) I have the following problem:
With Arduino Duemilanove (FTDI driver) it works,
Arduino Uno (CH340 driver) does not charge – does not communicate.
I mention that:
– ESP power supply is at 5V,
– In series with Tx and Rx I put 1K resistors due to the voltage difference (3.3 – 5V) on the terminals.
Does anyone have any idea.
Thanks!
good day
I apologize for using the English language compiler. In any such manual there is the use of an SD card and I ask how to do it without an SD card? Thank you
Hi.
I’m sorry, but I’m not sure that I understood your question.
This example works without the SD card. You don’t need to insert an SD card to make it work.
Regards,
Sara
Hi
everythings good but my program in serial monitor stops here itself
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10088
load:0x40080400,len:6392
entry 0x400806a4
After this nothing appears neither the connection status nor the ip address
Hi.
Remove GPIO 0 from GDN and press the on-board RST button.
Regards,
Sara
Right!
Ive only removed the GPIO0 to GND pin connection after the code is uploaded.
Yes i did that previously too!
But still there is no propt as “ wifi connected”
Sounds familiar. Did you remove the programming jumper from the cam board? I know!!
Hi!
Video Streaming works fine for me, but Face Recognition and Detection don’t work.
When I click the ‘Face Recognition’ button, the video freezes. The ESP32 crashes and reboots, according to the serial monitor error message:
No Match Found
CORRUPT HEAP: Bad head at 0x3ffe29ec. Expected 0xabba1234 got 0x00000008
abort() was called at PC 0x400889a1 on core 1
ELF file SHA256: 0000000000000000
Backtrace: 0x4008df7c:0x3ffe1bc0 0x4008e1f5:0x3ffe1be0 0x400889a1:0x3ffe1c00 0x40088acd:0x3ffe1c30 0x400d9eaf:0x3ffe1c50 0x400d6141:0x3ffe1f10 0x400d60d0:0x3ffe1f60 0x40093521:0x3ffe1f90 0x400890e2:0x3ffe1fb0 0x40088899:0x3ffe1fd0 0x4000bec7:0x3ffe1ff0 0x400d1df9:0x3ffe2010 0x40108619:0x3ffe21c0 0x40108d21:0x3ffe21f0 0x40108dd9:0x3ffe2280 0x401091ac:0x3ffe22a0 0x40107898:0x3ffe22c0 0x401078ef:0x3ffe2300 0x4008fe76:0x3ffe2320
Rebooting…
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4
.
WiFi connected
Starting web server on port: ’80’
Starting stream server on port: ’81’
Do you have any suggestions to get it working? Thanks in advance!
Yes facing the same problem
Any solution pl share…
@sara pl help
Hi.
What’s the board that you’re using?
Does your board have PSRAM?
What’s your ESP32 boards version installed in your Arduino IDE?
Regards,
Sara
I use the ESP32-CAM Module with OV2640 Camera. For me, the problem was solved by downgrading the ESP32 Library version from 1.0.5 to 1.0.4.
No idea why face recognition doesn’t work in 1.0.5.
The error causes by the codes as shown below.
static esp_err_t capture_handler() {}
static esp_err_t stream_handler() {}
free(net_boxes->score);
free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes);
Please find out the codes and modify as shown below.
/*
free(net_boxes->score);
free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes);
*/
net_boxes = NULL;
I modified the codes and face recognition worked well in 1.0.6.
Fuchungyi: it doesn’t work for mine
just worked for me as well, I am going to try fuchungyi suggestion next.
These boards are fantsastic
The 1.06 fix did not work for me, so I am going to revert to 1.04 and carry on.
You mention that the board supports both the OV2640 and the OV7670 cameras, but it appears that the software example you used here does not support the OV7670.
Do you know of a software example for this board that uses the OV75670?
ESP-32S ESPRESSIF is written on my board it is same as the ESP32-S AI-Thinker
Dont forget to turn off “Enable Client Isolation” in your access point / wireless router setting. If u checklist / enable those settings, your acess point won’t let you access another IP in your network
esptool.py v2.6
Serial port COM4
Traceback (most recent call last):
File “esptool.py”, line 2959, in
File “esptool.py”, line 2952, in _main
File “esptool.py”, line 2652, in main
File “esptool.py”, line 222, in init
File “site-packages\serial__init__.py”, line 88, in serial_for_url
File “site-packages\serial\serialwin32.py”, line 62, in open
serial.serialutil.SerialException: could not open port ‘COM4’: WindowsError(5, ‘Access is denied.’)
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected
Hi.
Check that you have the right port selected in Tools > Port.
Regards,
Sara
or please make sure no other application is opening the same port – happened to me a few times
Hi,
face detection and face recognition dont work. Should we have SD card inserted when we do face recognition?
Do you have an example of complete code for face detection and recognition?
Ty!!
Hi.
You need to use the ESP32 Boards add-on version 1.0.4. It doesn’t work with earlier versions. At least, at the moment.
Regards,
Sara
Hi,
I might have found another issue with this.
Here is the output of my Arduino. Not sure why this is happening.
BTW, the instead on using the ground pin next to UOT pin, I.m using the ground pin next to the 5V pin instead,
Arduino: 1.8.15 (Mac OS X), Board: “AI Thinker ESP32-CAM, 240MHz (WiFi/BT), QIO, 80MHz”
Sketch uses 2594390 bytes (82%) of program storage space. Maximum is 3145728 bytes.
Global variables use 56256 bytes (17%) of dynamic memory, leaving 271424 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port /dev/cu.usbserial-1410
Connecting……..__
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
WARNING: Detected crystal freq 41.47MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?
Crystal is 40MHz
MAC: 9c:9c:1f:ea:5d:d0
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
A fatal error occurred: Timed out waiting for packet header
A fatal error occurred: Timed out waiting for packet header
couldn’t find what baud rate works unfortunately
Any ideas or anybody is having the same issue?
Regards
Azrin
Hi.
Read this: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
I hope this helps.
Regards,
Sara
Hi Sara,
How would I modify the code to save pictures to an sd card?
Regards,
Dave
Hi Sara,
How do i modify my code to include saving pictures to an sd card?
Thanks,
Dave
Hi.
This tutorial might be helpful: https://randomnerdtutorials.com/esp32-cam-take-photo-save-microsd-card/
Regards,
Sara
Thank you for this tutorial! I bought a pair of ESP32-CAM from the same vendor. Packing says DFROBOT. Chip says ATHINKER, so I used ATHINKER successfully. Following the steps on “Getting started with the ESP32-CAM” I finally got 1 to work, one to kind of work.
Couple of troubleshooting tips:
1) Putting the jumper in the 5V position and connecting to the 5V pin allowed me to load the sketch
2) If, after loading your sketch, removing the programming jumper, reattaching the USB cable, the initialization just ends with an endless line of “………” every few seconds, your SSID or password is wrong. SSID is case sensitive.
My problem:
I have 2 ATHINKER ESP32-CAMs. My first one will not stream, but will take a still shot. When streaming it shows a small blank square with a broken icon. The second one will stream just fine. Same sketch, wiring, computer, cable. Any ideas why?
Hi.
That could be related to a weak wi-fi signal because of the antenna selection. It may be different on each board.
Check the antenna position for your cameras.
This tutorial explains it all: https://randomnerdtutorials.com/esp32-cam-connect-external-antenna/
This tutorial also explains something about the antenna, see bullet number bullet 7: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
That’s it! Just laying on the other side of the table was apparently enough to lose the signal. Thank you!
Hi,
Would you happen to have a tutorial on how to send data or commands from the ESP32-Cam to a Nano? I have a pan/tilt setup that controls two servos with an ESP32-Cam and I would like the Nano to control the servos instead by getting commands from the ESP32-Cam object detection to move the servos. Is this possible?
Thanks.
Hi.
You need two pins to communicate via Serial with your Arduino nano.
Regards,
Sara
Hey hi thr,
I am new too ESP-32 cam. I have been following your tutorials and those are really amazing. I did study both your codes and driver architect. Now i wonder esp_camera_fb_get(); how to use this function to read the exact frame rate (fps) or just give me an brief idea to read the frame rate (fps) of the ESP32-Cam with (ov264 module). I have a necessity of Video analysis and Photo analysis.
Hi there,
Can u tell how to read the frame rate (fps) of the ESP32-cam module. I am using one ov264 cam ( AI Thinker CAM ).
Is it necessary to put the SD card in esp-32 camera module for just live stream
Hi.
No, you don’t need it.
Regards,
Sara
hello Santos,
please add to troubleshooting, if use ESP-CAM-MB with ESP32-CAM, ESP.getPsramSize() report 0 PSRAM and stream is incredibly slow.
MJPG: 3972B 8169ms (0.1fps), AVG: 4106ms (0.2fps)
Hi,
Thank you so much for all your efforts!
I have bought several ESP32-CAMS and when I load (the same) CamWebServer_Example sketch all works well on each but some show the image in portrait mode and others in landscape.
Why is this happening with the same code and configuration? Are the boards different in some way or is the camera module itself wired up differently?
I would like all to operate in landscape mode – is there any way to make this happen or are these boards permanently different and how can I tell which one I’m buying?
Thank you for any help you can give me – it would be much appreciated.
Could one use the example code for the esp-cam and use it on a different MCU say an arduino with a different camera?
Hi.
The ESP32-CAM examples only work for OV2640 cameras.
Regards,
Sara
Hello,
Thanks for this project, I have the camera up and running! I do have a question about integrating it with Home Assistant. I tried adding the picture card in my ui-lovelace.yaml file but the stream is not coming up.
Here’s what I have:
– icon: mdi:cctv
title: Cameras
cards:
– type: picture
tap_action:
action: none
hold_action:
action: none
image: ‘http://192.168.1.140/’
Hi.
The stream is only accessible to one client at a time.
Close any other clients that may be connected to the ESP32-CAM video streaming.
Regards,
Sara
Hello,
Thanks again for your excellent tutorial.
Is it possible to rotate the streaming image 90 degrees?
Hi.
There isn’t a command to rotate 90 degrees.
There are functions to mirror and vertical flip the image. See in this tutorial: https://randomnerdtutorials.com/esp32-cam-ov2640-camera-settings/
Regards,
Sara
Hello from France Sara,
I just found this to, among other things, rotate the streaming image:
https://projetsdiy.fr/5-astuces-esp32-cam-adresse-ip-fixe-mode-ap-rotation-image-recuperation-automatique-connexion-wifi-stockage-code-html/#rotationimage
I am convinced that this will interest some people …
I have developed and formatted it for my own need.
To be able to modify the “camera_index.h” html file, I used “CyberChef” which works very well, there are tutorials on the web to use it.
I hope this will interest a few people.
Regards
gg
Hello, I’m thinking in a new project.
I want to build a time lapse camera long term to record my house building.
I think that programming the work hours and take any photos for a day.
I want no attending camera or battery and catch the camera passing 8/9months.
I read in the forum maybe don’t Support 32gb SD card… Isn’t it?.
My project…. it’s possible?
Thanks to all
It is possible when u connect ur esp32cam with arduino board and supply the power supply like solar pannel. But not sure for long term since the esp32cam get hot when long term stream?
Hello Sara,
I have one question to the ESP32-Cam:
How can I rotate the picture 90 degrees? I cannot rotate the Cam in the case.
Thanks and Merry Christmas.
Ulli
Hi.
Unfortunately, there isn’t a method to rotate the camera 90 degrees.
There is a method for mirror and horizontal flip. See this tutorial: https://randomnerdtutorials.com/esp32-cam-ov2640-camera-settings/
Regards,
Sara
Bonjour de France, j’avais trouvé ceci, très efficace, si ça peux servir…
https://projetsdiy.fr/5-astuces-esp32-cam-adresse-ip-fixe-mode-ap-rotation-image-recuperation-automatique-connexion-wifi-stockage-code-html/#rotationimage
Cordialement
I have purchased your CAM32 book – after payment (PayPal) I haven’t received a download link … how to get it?
BR
Hi.
You should receive an email with the instructions to access the RNTLAB.com website and get access to the eBook.
If you’re having trouble accessing it, please send an email to our support: https://randomnerdtutorials.com/support/
Regards,
Sara
You have written a great introduction. Thanks! Could the face recognition feature be trained to recognize a stationary logo (not a face) on a TV screen? Is there any gpio output when a face is recognized?
I’m wondering if the face recognition system could be used to recognise moods: can it tell a happy face from a grumpy one?
I imagine that that would be easier than recognising different faces, but I have no idea how it works, so I wouldn’t know where to start.
Hi,
Wi-Fi connection of the ESP32 CAM disconnects when I switched on face recognition.
No face recognition. Pls. help.
Hi.
Make sure you have a strong Wi-Fi connection.
The board should be relatively close to your router. Also, check if your board needs an external antenna: https://randomnerdtutorials.com/esp32-cam-connect-external-antenna/
It should also be powered with a good/stable power supply.
Regards,
Sara
I have got face recognition working after implementing a suggestion to download the ESP32 library to 1.04, the other suggestion to use 1.06 and edit the code did not work.
Have you any plans to extend the tutorial to store and then load the data required for face recognition to the SD card?
At the moment the information is lost when the board is re-powered?
It is certainly something I will be looking into.
Great tutorials.
I want to get rid of the text output giving info about the video produced. It comes out in the serial monitor and I want to put other info there without it being cluttered by the video info. Do you know where the code is which is producing this. I can’t see it in the camera library files.
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6360
entry 0x400806b4
[E][camera.c:1113] camera_probe(): Detected camera not supported.
[E][camera.c:1379] esp_camera_init(): Camera probe failed with error 0x20004
Hi.
Take a look at our troubleshooting guide: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Hello, I’m trying this module and my question is if it can be done digital zoom streaming?
Thanks
Hello,
I always have the same problem, whether I compile ‘CameraWebServer’ on my Mac or my PC, I get the following error:
CameraWebServerJB:65:12: error: ‘struct camera_config_t’ has no member named ‘fb_location’
config.fb_location = CAMERA_FB_IN_DRAM;
^
CameraWebServerJB:65:26: error: ‘CAMERA_FB_IN_DRAM’ was not declared in this scope
config.fb_location = CAMERA_FB_IN_DRAM;
Any idea?
Hi.
What is the ESP32 boards version you have installed?
Regards,
Sara
ESP 32 by Espressif Systems version 1.0.6
Hello. I am a true newbie in this but learning a lot with you both. May you please tell me if it is possible to make this project conecting the arduino board to the ESP32-CAM Board with that same code? Thank you in advance. Regards from Lisboa, Portugal.
It can work too, just connect it with tx to tx rx to rx in the arduino board
My camera got connected to the wifi and I got the IP address as well. The IP address cannot be reached through browser
What do you get on the web browser? Do you get any errors?
Regards,
Sara
Hi Sara, i having my project using esp32cam and the dht22 on the io port 15 of the esp32cam. When it start streaming online, the dht22 on the serial monitor will failed to read the humidity and temperature data. How this happen?
It had to be the the same Wifi connection as your ESP32CAM connected. So it can stream the video
Hi Sara, i having my project using esp32cam and the dht22 on the io port 15 of the esp32cam. When it start streaming online, the dht22 on the serial monitor will failed to read the humidity and temperature data. How this happen?
Hi Sara,
I tried this “mounting” with ESP32-cam, it worked almost perfectly.
I say this because although I followed all the steps, it does not connect to my WiFi network.
The connection data are the correct ones (SSID and Password).
It generates its own WiFi network with the address 192.168.4.1 to which I connected both with my phone and with my laptop.
Am I wrong somewhere?
In the serial monitor after reset I receive the following:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:6968
load:0x40078000,len:13072
ho 0 tail 12 room 4
load:0x40080400,len:3896
entry 0x40080688
[0;32mI (30) boot: ESP-IDF v4.1-dirty 2nd stage bootloader[0m
[0;32mI (30) boot: compile time 16:15:01[0m
[0;32mI (30) boot: chip revision: 1[0m
[0;32mI (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0[0m
[0;32mI (40) boot.esp32: SPI Speed : 40MHz[0m
[0;32mI (45) boot.esp32: SPI Mode : DIO[0m
[0;32mI (49) boot.esp32: SPI Flash Size : 4MB[0m
[0;32mI (54) boot: Enabling RNG early entropy source…[0m
[0;32mI (59) boot: Partition Table:[0m
[0;32mI (63) boot: ## Label Usage Type ST Offset Length[0m
[0;32mI (70) boot: 0 nvs WiFi data 01 02 00009000 00005000[0m
[0;32mI (78) boot: 1 otadata OTA data 01 00 0000e000 00002000[0m
[0;32mI (85) boot: 2 app0 OTA app 00 10 00010000 00300000[0m
[0;32mI (93) boot: 3 spiffs Unknown data 01 82 00310000 000f0000[0m
[0;32mI (100) boot: End of partition table[0m
[0;32mI (104) boot_comm: chip revision: 1, min. application chip revision: 0[0m
[0;32mI (112) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1d2048 (1908808) map[0m
[0;32mI (847) esp_image: segment 1: paddr=0x001e2070 vaddr=0x3ffbdb60 size=0x04d3c ( 19772) load[0m
[0;32mI (856) esp_image: segment 2: paddr=0x001e6db4 vaddr=0x40080000 size=0x00400 ( 1024) load[0m
[0;32mI (857) esp_image: segment 3: paddr=0x001e71bc vaddr=0x40080400 size=0x08e54 ( 36436) load[0m
[0;32mI (879) esp_image: segment 4: paddr=0x001f0018 vaddr=0x400d0018 size=0x9df74 (647028) map[0m
[0;32mI (1126) esp_image: segment 5: paddr=0x0028df94 vaddr=0x40089254 size=0x0b6a0 ( 46752) load[0m
[0;32mI (1158) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (1158) boot: Disabling RNG early entropy source…[0m
⸮
SD Size: 7624MB OK
PSRAM OK
ESP32-CAM-MB
Hi there to all of you,
Hi Sara,
Nice tutorial. I made a “system” with ESP32 cam and one usb programmer, uploaded the code and surprise…. Won’t connect to my wifi network even if I gave the right credentials. It’s working on my phone and on my laptop (after I connect my laptop to the wifi network generated by esp32). That was yesterday, today at work, I realized that the ESP32 have a resident software inside and my code doesn’t upload. Why I am saying that? Simply because I forget to put IO0 to the ground. I soldered 7 pin socket 5 for USB programmer and 2 for a jumper, but I didn’t connect to ESP32…. My fault…. This evening I will make all connection “by the book” and try again. So the idea is that ESP32 have some program resident “by default”, which will be over written by us in the uploading process from Arduino IDE ..
Hi to All, This is regarding ESP32 CAM module. When upload the Camera Web Server programme to my ESP 32 CAM, always get basic adjustment menu and the picture. How to get ADVANCE SETTINGS on the menu that appearing below scan start button. .Anything to do with Version of the IDE or ESP 32 version. I tried but failed I can see In some utube demos this feature is visible. Please help to get going.
Thanks
Ranraj
Hi.
I’m not sure… try downgrading the ESP32 boards version.
Regards,
Sara
Hi Sara,
I had the same problem and I solved it with just 3 lines from the forum (https://github.com/nkolban/esp32-snippets/issues/168)
” I have the same problem. I found that solution in a forum :
#include “soc/soc.h”
#include “soc/rtc_cntl_reg.h”
void setup(){
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector “
15:44:32.105 -> #⸮⸮
15:44:32.105 -> ⸮⸮2⸮⸮b66⸮+>⸮3⸮2⸮⸮”c⸮⸮'{⸮⸮⸮*#⸮d’⸮⸮ 6:#⸮⸮⸮J⸮L⸮H_!L
the output on serial monitor is this why please help me
Hi.
Check that you’re using the right baud rate on the Serial Monitor: 115200
Regards,
Sara
Hi,
Worked well. I had a new ESP32 cam with usb.
Very good tutorial, appreciate your work.
Many thanks.
sir can we program esp32cam for gesture recognization and use it with hardware mobile or laptop
Hi,
there are few lines used ‘free’ like: free(net_boxes->score);
may I know which library come out the ‘free’ variables please?
Thanks
Summer
Does the esp32 cam video streaming uses any video compression technique? If not can we implement something….
Hi Sara
Thanks for the great tutorials and projects.
I can get the code uploaded and obtain the IP address for CameraWebServer, but when I try to connect via the browser with the IP address, there is no connection. There is no error message, just unable to connect to the CameraWebServer. After I uploaded the code, I got the following msg on the Serial monitor below, but there is no “Starting web server on port: ’80’ & Starting stream server on port: ’81’ ” msg in between, does that mean the CameraWebServer never got started and hence the no connection problem? If that is the case, what could be the source of the problem.
“….
WiFi connected
Camera Ready! Use ‘http://XXX.XX.X.XXX’ to connect ”
Thanks and Happy Thanksgiving.
Hello, I cannot enroll the face. If i click on the button nothing happen. Can you help me? thank you in advance.
Manuel
Hello there,
I can’t upload the code, and get the following error:
Arduino: 1.8.19 (Windows 10), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA/1MB SPIFFS), QIO, 80MHz, 921600, None, Disabled”
Sketch uses 1496825 bytes (47%) of program storage space. Maximum is 3145728 bytes.
Global variables use 71364 bytes (21%) of dynamic memory, leaving 256316 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.2.1
Serial port COM14
Connecting………………………………..
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
the selected serial port For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
does not exist or your board is not connected
Hi.
It seems your board is not in flashing mode or you don’t have a proper serial connection with your board.
See our troubleshooting guide: https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/
Regards,
Sara
Thanks, it works now, but I’m facing another issue.
What issue?
Hello,
I don’t know which module I should uncomment in the code, where my ESP-32S ESPRESSIF is printed on my board.
please advise.
Hi.
Send me a link to your board…
Regards,
Sara
Hello,
https://www.ebay.com/itm/363950015522?mkcid=16&mkevt=1&mkrid=711-127632-2357-0&ssspo=imelkjcetqi&sssrc=2349624&ssuid=u3I2qjbqSWm&var=&widget_ver=artemis&media=COPY
while loading, I get “Chip is ESP32-D0WD (revision 1)” printed. so which module I should uncomment in the code?
hi Felipe,
will you share the experience about MQTT Client library