HTTP Camera Server example with latest ESP-IDF and chineese (clone?) Ai-Thinker ESP32-CAM module with XRZ00D1-V240 camera module
It's module based on ESP32 SOC with camera and SD-card slot
It's OV2640 (or compatible?) camera module which you can get with latest ESP32-CAM modules from Aliexpress, Banggod, etc.
Yep, it doesn't work out of the box with any example firmware. Module sells without any source codes ¯_(ツ)_/¯
- You need latest ESP-ID SDK. How to install it.
- Clone repo
- Run
idf.py menuconfigand set WIFI SSID and password (myssid/mypassword is default) - Run
idf.py build
- Short IO0 and GND on ESP-32 module to boot into flash mode
- Connect ESP32-CAM to any serial adapter (U0R <— TX, U0T —> RX)
- To flash you may run
idf.py -p /dev/ttyUSB0 flashwhere/dev/ttyXXXis your serial port - After flashing you shoud unconnect IO0 and GND and push RESET button on module to boot new firmware
- You can use
idf.py monitto check boot logs - Connect via wifi to it's ssid
- Open
http://192.168.4.1/jpgto make shot
Check power source. My module works with 3.3v even 5v, but when powering with 3.3v there is artifacts on image.
If nothing works, try to flash pre-built binary with esptool:
esptool.py -p YOUR_SERIAL_PORT_PATH -b 460800 --after hard_reset write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 binary/bootloader.bin 0x8000 binary/partition-table.bin 0x10000 binary/ESP32-CAM_HTTP_AP.bin
Built with sources of WiFi softAP example, Simple HTTPD Server Example, ESP32 Camera Driver (modified)
ESP32 Camera Driver modified due to this error while starting:
E (1710) ledc: requested frequency and duty resolution can not be achieved, try reducing freq_hz or duty_resolution. div_param=3
E (1720) camera_xclk: ledc_timer_config failed, rc=ffffffff
Need to move periph_module_enable(PERIPH_LEDC_MODULE); from top to end of function in /components/esp32-camera/driver/xclk.c file (thanks @masterd89 for solution)
In menuconfig enabled PSRAM (Serial flasher config ---> Flash size (4 MB))
In menuconfig flash size setted to 4M (Component config ---> ESP32-specific ---> [*] Support for external, SPI-connected RAM)