Simple Camera from ESP32-S3 wroom with OV2640
Table of Contents
a simple camera that take picture when the button (on GPIO14) is pressed, the resulted picture is save to SD card
GPIO14 -> button
(VCC+10k resistor) & GND -> button
Download and install the software and library
---How to install library.zip---
- Open ArduinoIDE
- Go to Sketch -> Include Library -> Add ZIP.Library...
- Choose the library
- Wait for "Library installed" in Output
List of Software and Library used.
ArduinoIDE ver 2.3.2
Library "sd_read_write.h" [included in "libraries_esp32.zip"]
Library "SD_MMC.h" [included in "libraries_esp32.zip"]
Library "esp_camera.h" [included in "libraries_esp32.zip"]
Library "soc/rtc_cntl_reg.h" [included in "libraries_esp32.zip"]
Library "driver/rtc_io.h" [included in "libraries_esp32.zip"]
After assemble the board and button
- Plug in the ESP32-S3 using type-C usb cable
- Open ArduinoIDE
- In File -> Preferences -> Additional board manager URLs -> put "https://dl.espressif.com/dl/package_esp32_index.json"
- Open the file "ESP32S3_IPHcam_Upgrade"
- Set Board Library, Upload Setting to be as listed
-
Board Library
esp32 by Espressif Systems [ver 2.0.10]
- Upload Setting
Choose Board : ESP32S3 Dev Module
USB CDC On Boot : "Disable"
CPU Frequency : "240MHz"
Core Debug Level : recommend "Debug" or "Verbose"
USB DFU On Boot : "Disable"
Erase All Flash Before Sketch Upload: "Enabled"
Events Run On: "Core 1"
Flash Mode: "QIO 80MHz"
Flash Size: "8MB (64Mb)"
JAG Adapter: "Disabled"
Arduino Runs On: "Core 1"
USB Firmware MSC On Boot: "Disabled"
Partition Scheme: "8M with spiffs (3MB APP/1.5MB SPIFFS)" //recommend any 3MB APP paritition
PSRAM: "OPI PSRAM" //must enable for better photo quality
Upload Mode: "UARTO / Hardware CDC*
Upload Speed: "921600"
USB Mode: "Hardware CDC and TAG"
- click Verify
- click Upload //upload file to ESP32S3
- Wait for upload success message
- Check Serial Terminal
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2b (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4
[ 111][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
+++Camera config Done+++
+++Camera init Done+++
+++Camera Done+++
Camera OK!
SD_MMC Card Type: SDHC
SD_MMC Card Size: 30436MB
Total space: 30424MB
Used space: 9MB
MicroSD OK!
Removing Dir: /camera
rmdir failed
Creating Dir: /camera
Dir created
Listing directory: /camera
FILE: 0.jpg SIZE: 90544
+++Memory+++
Total heap: 383468
Free heap: 337248
Total PSRAM: 8386215
Free PSRAM: 8096831
Press the button to take picture