How to program ESP-32 cam using Arduino UNO board

In this article, I am going to describe how to program ESP32 cam module using arduino IDE & without FDTI & any other USB to ttl converter.

ESp32 cam

This low price development board has onboard 5volt to 3.3-volt voltage regulator chip, an ESP32 chip with Bluetooth(BLE), wifi, GPIO pins, 2MP camera & a big sized SMD led but unfortunately this cheap board has not any onboard programmer chip like other nodemcu board. Usually, we have to program it using FDTI or USB to TTL converter.

IF you don’t have any USB to TTL converter & have an Arduino UNO then no need to waste money to buy this TTL converter.

You need to program in this method

  1. ESP32 cam ( I am using AI thinker)
  2. Arduino UNO board
  3. Jumper wire
  4. Arduino IDE software

Connection ESP32 cam to Arduino UNO

  • Connect Arduino 5volt to esp 32 cam 5 volt.
  • Arduino GND to GND
  • Arduino RX to Cam board RX & TX to TX
  • Arduino reset pin to GND
  • ESP 32cam D0 to Gnd

Make sure the cam board DO is connected to gnd. It will enable esp 32 flash mode otherwise you can’t program it. after compleat, the programming remove D0 to gnd

COnnection of arduino uno to esp32 cam

Now open Arduino IDE on your PC, go to File > Preferences >

Now paste below link in the board manager URL

esp32ca programming

Now go to Tools > Board > Board manager > & search for ESP 32

You can see esp 32 board Download & install the latest version package

After complete, the installation go to Tools > Select port where arduino UNO is connected

  • Now go to board > select board > ESP32 ” Wrover Module”
  • Flash Mode > QIO
  • Flash Frequency > 40MHZ
  • Partition Scheme > Huge App (3mb No OTA)
  • Upload speed > 115200
  • Programmer > AVR ISP

Now it is ready for uploading sketch

You can test it Go to File > Example > ESP32 > Camera > Camera web server and upload the sample sketch

This is video of esp 32 cam programming


  1. hey bro, i had tried to build program in esp32 cam module as pr ur instruction but it not success.
    there are some error shown in ide

    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

    can u help me to solve this issue.

    1. Hello Rucha,
      make sure D 0 is connected to gnd
      power connected to Arduino 5V & check all jumper wires
      press reset on esp32 cam when uploading.

  2. This is the solution that solved my “Timeout waiting for header” issue. I tried around 20 other solutions prior to this.

  3. If you ever want to take some of the load off, I’d love to write some articles for your blog in exchange for a link back to mine.Please blast me an e-mail if interested. Cheers!

  4. It’s a pity you don’t have a donate button! I’d without a doubt donate to this fantastic blog! I guess for now i’ll settle for bookmarking and adding your RSS feed to my Google account. I look forward to new updates and will share this site with my Facebook group. Chat soon!| а

  5. it looksfine however, if opening in Internet Explorer, it has some overlapping issues.I merely wanted to provide you with a quick heads up!Other than that, fantastic website!

  6. Hey there I am so thrilled I found your webpage,I really found you by error, while I was searching on Google for something else.

  7. Appreciating the dedication you put into your website and
    in depth information you provide. It’s nice to come across a
    blog every once in a while that isn’t the same old rehashed material.
    Great read! I’ve bookmarked your site and I’m adding your
    RSS feeds to my Google account.

  8. I think the admin of this website is genuinely working hard in support of his web site,
    because here every stuff is quality based data.

  9. Hello there, just became aware of your blog through Google, and found that it is truly informative.I am going to watch out for brussels.

  10. Exploring in Yahoo I ultimately stumbled upon this website.Studying this info So i’m glad to show that I have an incredibly excellent uncanny feelingI came upon just what I needed.

  11. I’m really enjoying the design and layout of your blog.It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more often.

  12. Hello
    I have problem can every body help me please
    That I connected my arduino uno to the esp32 and uploaded the code from arduino ide to the arduino and it uploaded but when I opened the serial monitor that not appeared the IP address as above that write error
    Camera_probe(): detected camera not supported
    esp_camera_init(): camera probe failed with error 0×20004
    So,can any one help me please …

  13. Any reason why it should not work equally good with the MKR1010 board (my UNO is occupied in another project)?
    As soon as I connect the MKR1010 reset to GND, the USB port connected to are gone in the “Tools/Port”-list.
    any thoughts on that?
    Great tutorial btw!

  14. hi Cudos to you ,I spent many hours trying to get my esp32 camera working . I tried many other videos which purported to do this but nothing worked. Your clear instructions worked first try and saved me from bying a new camera.
    Thankyou so much

    Greg Otto

  15. Thanks buddy, Your article was very precise. I had many unsuccessful attempt to get my ESP32 cam up and working using the serial programmer. I stumbled upon your article of using arduino to program te ESP. it solved my 2 days of vain.

    How can i get the menu to change the camera setting in the broswer. I seem to miss that in the current solution. Am I missing something pls suggest.


  16. Good post. I learn something totally new and challenging on sites I stumbleupon every day.
    It’s always interesting to read through content from other authors and practice something from their websites.

  17. Hello,
    Thanks for your blog it’s very informative.
    I have an issue unfortunately after following all the mentioned steps, I can’t use any programmer in arduino IDE when I select different boards…any advice, please?

  18. I’ve been trying for days to get this working, but no luck. I’ve tried connecting via an FTDI interface board, no luck. I’ve tried connecting via an Arduino Uno, no luck. With the Uno I WAS finally able to get it starting to work, but it failed (again, as always) while uploading the Sketch with the error message “A fatal error occurred: Timed out waiting for packet header”.

    It got PART of the way, with this info being displayed as it connected and started to communicate:


    Serial port COM5


    Chip is ESP32D0WDQ6 (revision 1)

    Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None

    MAC: fc:f5:c4:01:91:74

    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…

    Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4096.0 kbit/s)…

    A fatal error occurred: Timed out waiting for packet header


    Both the TX and RX LEDs on the Arduino blink nicely, seeming to indicate that info is going to the ESP32-CAM and getting info back from it. But then it fails with that same error each time.

    Everything is connected correctly. So why is it failing?

    I will much appreciate any suggestions you can make.

  19. Hey there! I’ve been folloowing your web site for a long time now
    and finally got the ourage to go ahead and give you a shout
    out from Huffman Tx! Just wanted to mention keep up the great job!

  20. Arduino: 1.8.13 (Mac OS X), Board: “ESP32 Wrover Module, Huge APP (3MB No OTA/1MB SPIFFS), QIO, 40MHz, 115200, None”

    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. v2.6
    Serial port /dev/cu.usbmodem14201
    Chip is ESP32D0WDQ6 (revision 1)
    Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
    MAC: 24:62:ab:f2:9f:0c
    Uploading stub…
    Running stub…
    Stub running…
    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 5339.8 kbit/s)…
    Hash of data verified.
    Compressed 17408 bytes to 11231…
    Wrote 17408 bytes (11231 compressed) at 0x00001000 in 1.0 seconds (effective 142.9 kbit/s)…
    Hash of data verified.
    Compressed 2100768 bytes to 1661737…
    Writing at 0x0003c000… (11 %)
    A fatal error occurred: Failed to write compressed data to flash after seq 11 (result was C100)
    A fatal error occurred: Failed to write compressed data to flash after seq 11 (result was C100)

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

  21. Dear All,

    Kindly please help with your valuable inputs

    Writing at 0x0003c000… (11 %) done
    A fatal error occurred: Failed to write compressed data to flash after seq 11 (result was C100)

Leave a Reply

Your email address will not be published. Required fields are marked *