ESP32 Tips

Example of ESP32 Camera Library using OV2640 module

As it's too large to elaborate the example of sketch in ESP32 > Web Camera Server. I tried to ESP32 DevKit C and Camera modules (OV2640, that is the relevant camera module in ESP32-Cam).

I tried all that work refereing a blog that explains how to connect "esp32", "OV2640" and "SSD1331(OLED dispay).

1) Connection

Connection is like this image. You can check the assignment of the pin in the blog.


2) Setup board manager on Arduino IDE

Include a library for accessing OLED made by @mgo-tec, blog writer. I deeply appreciate his passionate works and detail explanations.


3) Write sample program (failed)

Error log when ESP32 is not shown as USB port

4)Recovery

4-1) Install UART driver to Mac

  $ ls /dev | grep -i usb

-> ports is not shown.

After install CP210x USB to UART Bridge VCP Drivers, the ports are shown.

  $ ls /dev | grep -i usb
  cu.SLAB_USBtoUART
  tty.SLAB_USBtoUART

Ref: expensif forum


4-2) Fix incorrect pin connection

However, I still had the same error even after changed to the simplesst sketch of the default(blank) sketch description with setup(){} and loop(){}.

I checked a datasheet of ESP32-DevKitXC V4 board and found that I connected “CMD” pin to GND carelessly. Then I fixed it.


4-3) Change USB cable

Change USB type A - USB mini cable to the boldes one in my room(speed charger cable for smartphone). Then ESP32 dev kit and Camera library worked.

After these recovery above, the camera and display worked as above image