Merged from develop (Updated documentation) (#115)

* Added seeed_xiao_esp32s3

* Fixed typo

* Updating build system

* Fixed typos

* Renamed envirnment name to seeed_xiao_esp32s3

* Update README.md

* Updated platformio definitions

* Added cache

* Updated README.md

* - Default value for initResult if initialzation fails

* constexpr camera_config_t m5stack_camera_settings

* Added M5Stack UnitCamS3

* Work in progress

* WIP

* Work in progress

* Removed OTA

* Added unitcams3

* UnitcamS3

* Corrected HTML for ipv4
fixed Sewrial issue esp32s2

* USER_LED_ON_LEVEL=LOW

* Added documentation pins for Mems/grove/led

* Typo

* Removed non required depencency

* Removed non required depencency

* Readded

* Added sccb_i2c_port
Retry 3 times camera init

* Added Freenove wroom-1 n8r8 board (#112)

Co-authored-by: Nick Eales <nick.eales@outlook.com>

* Fixing missing comma in xiao board json (#114)

* Updated Markdown

---------

Co-authored-by: absentwallaby <64674944+absentwallaby@users.noreply.github.com>
Co-authored-by: Nick Eales <nick.eales@outlook.com>
Co-authored-by: Nick Volgas <n.volgas@gmail.com>
This commit is contained in:
Rene
2024-03-10 11:11:03 +01:00
committed by GitHub
parent a60fbc7917
commit d99d1c510f
19 changed files with 164 additions and 53 deletions

View File

@@ -97,21 +97,21 @@ There are a lot of boards available that are all called ESP32-CAM.
However, there are differences in CPU (type/speed/cores), how the camera is connected, presence of PSRAM or not... However, there are differences in CPU (type/speed/cores), how the camera is connected, presence of PSRAM or not...
To select the right board use the table below and use the configuration that is listed below for your board: To select the right board use the table below and use the configuration that is listed below for your board:
| Board | Image | CPU | SRAM | Flash | PSRAM | Camera | | Site | | Board | Image | CPU | SRAM | Flash | PSRAM | Camera | | Site |
|--- |--- |--- |--- |--- | --- |--- |--- |--- | |--- |--- |--- |--- |--- | --- |--- |--- |--- |
| Espressif ESP32-Wrover CAM | ![img](assets/boards/esp32-wrover-cam.jpg) | ESP32 | 520KB | 4Mb | 4MB | OV2640 | | | | Espressif ESP32-Wrover CAM | ![img](assets/boards/esp32-wrover-cam.jpg) | ESP32 | 520KB | 4Mb | 4MB | OV2640 | | |
| AI-Thinker ESP32-CAM | ![img](assets/boards/ai-thinker-esp32-cam-ipex.jpg) ![img](assets/boards/ai-thinker-esp32-cam.jpg) | ESP32-S | 520KB | 4Mb | 4MB | OV2640 | | https://docs.ai-thinker.com/esp32-cam | | AI-Thinker ESP32-CAM | ![img](assets/boards/ai-thinker-esp32-cam-ipex.jpg) ![img](assets/boards/ai-thinker-esp32-cam.jpg) | ESP32-S | 520KB | 4Mb | 4MB | OV2640 | | [https://docs.ai-thinker.com/esp32-cam](https://docs.ai-thinker.com/esp32-cam) |
| Espressif ESP-EYE | ![img](assets/boards/espressif-esp-eye.jpg) | ESP32 | 520KB | 4Mb | 4MB | OV2640 | | | | Espressif ESP-EYE | ![img](assets/boards/espressif-esp-eye.jpg) | ESP32 | 520KB | 4Mb | 4MB | OV2640 | | |
| Espressif ESP-S3-EYE | ![img](assets/boards/espressif-esps3-eye.jpg) | ESP32-S3 | 520KB | 4Mb | 4MB | OV2640 | | https://www.espressif.com/en/products/devkits/esp-eye/overview | | Espressif ESP-S3-EYE | ![img](assets/boards/espressif-esps3-eye.jpg) | ESP32-S3 | 520KB | 4Mb | 4MB | OV2640 | | [https://www.espressif.com/en/products/devkits/esp-eye/overview](https://www.espressif.com/en/products/devkits/esp-eye/overview) |
| LilyGo camera module | ![img](assets/boards/lilygo-camera-module.jpg) | ESP32 Wrover | 520KB | 4Mb | 4MB | OV2640 / OV5640 | | | | LilyGo camera module | ![img](assets/boards/lilygo-camera-module.jpg) | ESP32 Wrover | 520KB | 4Mb | 4MB | OV2640 / OV5640 | | |
| LilyGo Simcam | ![img](assets/boards/lilygo-simcam.jpg) | | | | | OV2640 | | | | LilyGo Simcam | ![img](assets/boards/lilygo-simcam.jpg) | | | | | OV2640 | | |
| LilyGo TTGO-T Camera | ![img](assets/boards/lilygo-ttgo-t-camera.jpg) | | | | | OV2640 | | | | LilyGo TTGO-T Camera | ![img](assets/boards/lilygo-ttgo-t-camera.jpg) | | | | | OV2640 | | |
| M5Stack ESP32CAM | ![img](assets/boards/m5stack_esp32cam_02.webp) | ESP32 | 520Kb | 4Mb | - | OV2640 | Microphone | https://docs.m5stack.com/en/unit/esp32cam | | M5Stack ESP32CAM | ![img](assets/boards/m5stack_esp32cam_02.webp) | ESP32 | 520Kb | 4Mb | - | OV2640 | Microphone | [https://docs.m5stack.com/en/unit/esp32cam](https://docs.m5stack.com/en/unit/esp32cam) |
| M5Stack UnitCam | ![img](assets/boards/m5stack_unit_cam_02.webp) ![img](assets/boards/m5stack_unit_cam_03.webp) | ESP32-WROOM-32E | 520KB | 4Mb | - | OV2640 | | https://docs.m5stack.com/en/unit/unit_cam | | M5Stack UnitCam | ![img](assets/boards/m5stack_unit_cam_02.webp) ![img](assets/boards/m5stack_unit_cam_03.webp) | ESP32-WROOM-32E | 520KB | 4Mb | - | OV2640 | | [https://docs.m5stack.com/en/unit/unit_cam](https://docs.m5stack.com/en/unit/unit_cam) |
| M5Stack Camera | ![img](assets/boards/m5stack-esp32-camera.jpg) | ESP32 | 520Kb | 4Mb | - | OV2640 | | https://docs.m5stack.com/en/unit/m5camera | | M5Stack Camera | ![img](assets/boards/m5stack-esp32-camera.jpg) | ESP32 | 520Kb | 4Mb | - | OV2640 | | [https://docs.m5stack.com/en/unit/m5camera](https://docs.m5stack.com/en/unit/m5camera) |
| M5Stack Camera PSRAM | ![img](assets/boards/m5stack-esp32-camera.jpg) | ESP32 | 520Kb | 4Mb | 4Mb | OV2640 | | https://docs.m5stack.com/en/unit/m5camera | | M5Stack Camera PSRAM | ![img](assets/boards/m5stack-esp32-camera.jpg) | ESP32 | 520Kb | 4Mb | 4Mb | OV2640 | | [https://docs.m5stack.com/en/unit/m5camera](https://docs.m5stack.com/en/unit/m5camera) |
| M5Stack UnitCamS3 | ![img](assets/boards//m5stack_Unitcams3.webp) ![img](assets/boards/m5stack_Unitcams32.webp) | ESP32-S3-WROOM-1-N16R8 | 520Kb | 16Mb | 8Mb | OV2640 | | https://docs.m5stack.com/en/unit/Unit-CamS3 | | M5Stack UnitCamS3 | ![img](assets/boards//m5stack_Unitcams3.webp) ![img](assets/boards/m5stack_Unitcams32.webp) | ESP32-S3-WROOM-1-N16R8 | 520Kb | 16Mb | 8Mb | OV2640 | | [https://docs.m5stack.com/en/unit/Unit-CamS3](https://docs.m5stack.com/en/unit/Unit-CamS3) |
| Seeed studio Xiao ESP32S3 Sense | ![img](assets/boards/seeed-studio-xiao-esp32s3-sense.jpg) | ESP32-S3R8 | 520KB | 8Mb | 8MB | OV2640 | Microphone | https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html | | Seeed studio Xiao ESP32S3 Sense | ![img](assets/boards/seeed-studio-xiao-esp32s3-sense.jpg) | ESP32-S3R8 | 520KB | 8Mb | 8MB | OV2640 | Microphone | [https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html](https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html) |
## Installing and running PlatformIO ## Installing and running PlatformIO
@@ -155,12 +155,24 @@ There are to flavours to do this; using the command line or the graphical interf
### Using the command line ### Using the command line
First the source code has to be compiled. Type: Make sure you have the latest version of the Espressif toolchain.
```sh
pio pkg update -g -p espressif32
```
First the source code has to be compiled to build all targets
```sh ```sh
pio run pio run
``` ```
if only a specific target is required, for example the ```esp32cam_ttgo_t_journal``` type:
```sh
pio run -e esp32cam_ttgo_t_journal
```
When finished, firmware has to be uploaded. When finished, firmware has to be uploaded.
Make sure the ESP32-CAM is in download mode (see previous section) and type: Make sure the ESP32-CAM is in download mode (see previous section) and type:
@@ -168,6 +180,12 @@ Make sure the ESP32-CAM is in download mode (see previous section) and type:
pio run -t upload pio run -t upload
``` ```
or, again, for a specific target, for example ```esp32cam_ai_thinker```
```sh
pio run -t upload -e esp32cam_ai_thinker
```
When done remove the jumper when using a FTDI adapter or press the reset button on the ESP32-CAM. When done remove the jumper when using a FTDI adapter or press the reset button on the ESP32-CAM.
To monitor the output, start a terminal using: To monitor the output, start a terminal using:
@@ -221,21 +239,21 @@ In case changes have been made to the configuration, this is shown and the possi
Clicking on the ```change configuration``` button will open the configuration. It is possible that a password dialog is shown before entering. Clicking on the ```change configuration``` button will open the configuration. It is possible that a password dialog is shown before entering.
If this happens, for the user enter 'admin' and for the password the value that has been configured as the Access Point password. If this happens, for the user enter 'admin' and for the password the value that has been configured as the Access Point password.
## Connecting to the RTSP stream :video_camera: ## Connecting to the RTSP stream
RTSP stream is available at: [rtsp://esp32cam-rtsp.local:554/mjpeg/1](rtsp://esp32cam-rtsp.local:554/mjpeg/1). RTSP stream is available at: [rtsp://esp32cam-rtsp.local:554/mjpeg/1](rtsp://esp32cam-rtsp.local:554/mjpeg/1).
This link can be opened with for example [VLC](https://www.videolan.org/vlc/). This link can be opened with for example [VLC](https://www.videolan.org/vlc/).
## Connecting to the JPEG motion server :video_camera: ## Connecting to the JPEG motion server
The JPEG motion server server is available using a normal web browser at: [http://esp32cam-rtsp.local:/stream](http://esp32cam-rtsp.local/stream). The JPEG motion server server is available using a normal web browser at: [http://esp32cam-rtsp.local:/stream](http://esp32cam-rtsp.local/stream).
## Connecting to the image server :camera: ## Connecting to the image server
The image server server is available using a normal web browser at: [http://esp32cam-rtsp.local:/snapshot](http://esp32cam-rtsp.local/snapshot). The image server server is available using a normal web browser at: [http://esp32cam-rtsp.local:/snapshot](http://esp32cam-rtsp.local/snapshot).
:bangbang: **Please be aware that there is no password present!**. :bangbang: **Please be aware that there is no password present!**.
Everybody with access to the device can see the streams or images! Beware of :trollface:! Everybody with network access to the device can see the streams or images! Beware of :trollface:!
## API ## API

View File

@@ -31,7 +31,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'" "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
], ],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "40000000L", "f_flash": "40000000L",

View File

@@ -1,6 +1,6 @@
{ {
"build": { "build": {
"arduino":{ "arduino": {
"ldscript": "esp32s2_out.ld" "ldscript": "esp32s2_out.ld"
}, },
"core": "esp32", "core": "esp32",
@@ -31,7 +31,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'" ], "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "80000000L", "f_flash": "80000000L",
"flash_mode": "qio", "flash_mode": "qio",
@@ -58,4 +59,4 @@
}, },
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp-lyrap-cam-v1.1.html", "url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp-lyrap-cam-v1.1.html",
"vendor": "Espressif" "vendor": "Espressif"
} }

View File

@@ -1,6 +1,6 @@
{ {
"build": { "build": {
"arduino":{ "arduino": {
"ldscript": "esp32s2_out.ld" "ldscript": "esp32s2_out.ld"
}, },
"core": "esp32", "core": "esp32",
@@ -31,7 +31,9 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'" ], "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "80000000L", "f_flash": "80000000L",
"flash_mode": "qio", "flash_mode": "qio",
@@ -58,4 +60,4 @@
}, },
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp-lyrap-cam-v1.1.html", "url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp-lyrap-cam-v1.1.html",
"vendor": "Espressif" "vendor": "Espressif"
} }

View File

@@ -33,7 +33,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'" "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
], ],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "80000000L", "f_flash": "80000000L",
@@ -68,4 +69,4 @@
}, },
"url": "https://www.espressif.com/en/news/Maple_Eye_ESP32-S3", "url": "https://www.espressif.com/en/news/Maple_Eye_ESP32-S3",
"vendor": "Espressif" "vendor": "Espressif"
} }

View File

@@ -33,7 +33,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'" "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
], ],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "80000000L", "f_flash": "80000000L",
@@ -72,4 +73,4 @@
}, },
"url": "https://www.espressif.com/en/products/devkits/esp-eye/overview", "url": "https://www.espressif.com/en/products/devkits/esp-eye/overview",
"vendor": "Espressif" "vendor": "Espressif"
} }

View File

@@ -31,7 +31,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=1'", "'-D CAMERA_CONFIG_FB_COUNT=1'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'" "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
], ],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "40000000L", "f_flash": "40000000L",
@@ -62,4 +63,4 @@
}, },
"url": "https://www.espressif.com/en/products/devkits/esp-eye/overview", "url": "https://www.espressif.com/en/products/devkits/esp-eye/overview",
"vendor": "Espressif" "vendor": "Espressif"
} }

View File

@@ -0,0 +1,70 @@
{
"build": {
"arduino": {
"ldscript": "esp32s3_out.ld",
"partitions": "default_8MB.csv",
"memory_type": "qio_opi"
},
"core": "esp32",
"extra_flags": [
"'-D ARDUINO_ESP32S3_DEV'",
"'-D ARDUINO_USB_MODE=1'",
"'-D BOARD_HAS_PSRAM'",
"'-D ARDUINO_RUNNING_CORE=1'",
"'-D ARDUINO_EVENT_RUNNING_CORE=1'",
"'-D ARDUINO_USB_CDC_ON_BOOT=1'",
"'-D CAMERA_CONFIG_PIN_PWDN=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_RESET=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_XCLK=15'",
"'-D CAMERA_CONFIG_PIN_SCCB_SDA=4'",
"'-D CAMERA_CONFIG_PIN_SCCB_SCL=5'",
"'-D CAMERA_CONFIG_PIN_Y9=16'",
"'-D CAMERA_CONFIG_PIN_Y8=17'",
"'-D CAMERA_CONFIG_PIN_Y7=18'",
"'-D CAMERA_CONFIG_PIN_Y6=12'",
"'-D CAMERA_CONFIG_PIN_Y5=10'",
"'-D CAMERA_CONFIG_PIN_Y4=8'",
"'-D CAMERA_CONFIG_PIN_Y3=9'",
"'-D CAMERA_CONFIG_PIN_Y2=11'",
"'-D CAMERA_CONFIG_PIN_VSYNC=6'",
"'-D CAMERA_CONFIG_PIN_HREF=7'",
"'-D CAMERA_CONFIG_PIN_PCLK=13'",
"'-D CAMERA_CONFIG_CLK_FREQ_HZ=20000000'",
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "dio",
"hwids": [
[
"0x303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "esp32s3"
},
"connectivity": [
"wifi"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "ESP32 FREENOVE S3 WROOM",
"upload": {
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"require_upload_port": true,
"speed": 460800
},
"url": "https://github.com/Freenove/Freenove_ESP32_S3_WROOM_Board",
"vendor": "Freenove"
}

View File

@@ -31,7 +31,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'" "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
], ],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "40000000L", "f_flash": "40000000L",
@@ -62,4 +63,4 @@
}, },
"url": "https://www.aliexpress.com/item/1005004960637276.html", "url": "https://www.aliexpress.com/item/1005004960637276.html",
"vendor": "Freenove" "vendor": "Freenove"
} }

View File

@@ -28,6 +28,7 @@
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=1'", "'-D CAMERA_CONFIG_FB_COUNT=1'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'", "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
"'-D GROVE_SDA=13'", "'-D GROVE_SDA=13'",
"'-D GROVE_SCL=4'" "'-D GROVE_SCL=4'"
], ],
@@ -60,4 +61,4 @@
}, },
"url": "https://docs.m5stack.com/en/unit/m5camera", "url": "https://docs.m5stack.com/en/unit/m5camera",
"vendor": "M5STACK" "vendor": "M5STACK"
} }

View File

@@ -30,6 +30,7 @@
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'", "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
"'-D GROVE_SDA=13'", "'-D GROVE_SDA=13'",
"'-D GROVE_SCL=4'" "'-D GROVE_SCL=4'"
], ],
@@ -62,4 +63,4 @@
}, },
"url": "https://docs.m5stack.com/en/unit/m5camera", "url": "https://docs.m5stack.com/en/unit/m5camera",
"vendor": "M5STACK" "vendor": "M5STACK"
} }

View File

@@ -32,6 +32,7 @@
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'", "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
"'-D MICROPHONE_GPIO=32'", "'-D MICROPHONE_GPIO=32'",
"'-D GROVE_SDA=13'", "'-D GROVE_SDA=13'",
"'-D GROVE_SCL=4'" "'-D GROVE_SCL=4'"
@@ -65,4 +66,4 @@
}, },
"url": "https://docs.m5stack.com/en/unit/esp32cam", "url": "https://docs.m5stack.com/en/unit/esp32cam",
"vendor": "M5STACK" "vendor": "M5STACK"
} }

View File

@@ -29,7 +29,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=1'", "'-D CAMERA_CONFIG_FB_COUNT=1'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'" "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
], ],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "40000000L", "f_flash": "40000000L",
@@ -60,4 +61,4 @@
}, },
"url": "https://docs.m5stack.com/en/unit/unit_cam", "url": "https://docs.m5stack.com/en/unit/unit_cam",
"vendor": "M5STACK" "vendor": "M5STACK"
} }

View File

@@ -36,6 +36,7 @@
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'", "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'",
"'-D I2C_MEMS_SDA=48'", "'-D I2C_MEMS_SDA=48'",
"'-D I2C_MEMS_SCL=47'", "'-D I2C_MEMS_SCL=47'",
"'-D TF_CS=9'", "'-D TF_CS=9'",
@@ -80,4 +81,4 @@
}, },
"url": "https://docs.m5stack.com/en/unit/Unit-CamS3", "url": "https://docs.m5stack.com/en/unit/Unit-CamS3",
"vendor": "M5STACK" "vendor": "M5STACK"
} }

View File

@@ -29,7 +29,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'" "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
], ],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "40000000L", "f_flash": "40000000L",
@@ -60,4 +61,4 @@
}, },
"url": "https://shop.m5stack.com/collections/m5-cameras", "url": "https://shop.m5stack.com/collections/m5-cameras",
"vendor": "M5STACK" "vendor": "M5STACK"
} }

View File

@@ -36,6 +36,7 @@
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'", "'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'", "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_PSRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'",
"'-D I2C_MEMS_SDA=41'", "'-D I2C_MEMS_SDA=41'",
"'-D I2C_MEMS_SCL=42'", "'-D I2C_MEMS_SCL=42'",
"'-D TF_CS=21'", "'-D TF_CS=21'",
@@ -80,4 +81,4 @@
}, },
"url": "https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html", "url": "https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html",
"vendor": "Seeed Studio" "vendor": "Seeed Studio"
} }

View File

@@ -28,6 +28,7 @@
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=1'", "'-D CAMERA_CONFIG_FB_COUNT=1'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'", "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
"'-D LCD_SSD1306_PIN_SDA=21'", "'-D LCD_SSD1306_PIN_SDA=21'",
"'-D LCD_SSD1306_PIN_SCL=22'", "'-D LCD_SSD1306_PIN_SCL=22'",
"'-D BUTTON_RIGHT_PIN=34'", "'-D BUTTON_RIGHT_PIN=34'",

View File

@@ -27,7 +27,8 @@
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'", "'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'", "'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=1'", "'-D CAMERA_CONFIG_FB_COUNT=1'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'" "'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'"
], ],
"f_cpu": "240000000L", "f_cpu": "240000000L",
"f_flash": "40000000L", "f_flash": "40000000L",

View File

@@ -219,8 +219,6 @@ esp_err_t initialize_camera()
log_i("JPEG quality: %d", param_jpg_quality.value()); log_i("JPEG quality: %d", param_jpg_quality.value());
auto jpeg_quality = param_jpg_quality.value(); auto jpeg_quality = param_jpg_quality.value();
log_i("Frame duration: %d ms", param_frame_duration.value()); log_i("Frame duration: %d ms", param_frame_duration.value());
constexpr auto i2c_port = I2C_NUM_0;
camera_config_t camera_config = { camera_config_t camera_config = {
.pin_pwdn = CAMERA_CONFIG_PIN_PWDN, // GPIO pin for camera power down line .pin_pwdn = CAMERA_CONFIG_PIN_PWDN, // GPIO pin for camera power down line
.pin_reset = CAMERA_CONFIG_PIN_RESET, // GPIO pin for camera reset line .pin_reset = CAMERA_CONFIG_PIN_RESET, // GPIO pin for camera reset line
@@ -250,7 +248,7 @@ esp_err_t initialize_camera()
#if CONFIG_CAMERA_CONVERTER_ENABLED #if CONFIG_CAMERA_CONVERTER_ENABLED
conv_mode = CONV_DISABLE, // RGB<->YUV Conversion mode conv_mode = CONV_DISABLE, // RGB<->YUV Conversion mode
#endif #endif
.sccb_i2c_port = i2c_port // If pin_sccb_sda is -1, use the already configured I2C bus by number .sccb_i2c_port = SCCB_I2C_PORT // If pin_sccb_sda is -1, use the already configured I2C bus by number
}; };
return cam.init(camera_config); return cam.init(camera_config);
@@ -380,11 +378,19 @@ void setup()
#endif #endif
iotWebConf.init(); iotWebConf.init();
camera_init_result = initialize_camera(); // Try to initialize 3 times
if (camera_init_result == ESP_OK) for (auto i = 0; i < 3; i++)
update_camera_settings(); {
else camera_init_result = initialize_camera();
log_e("Failed to initialize camera: 0x%0x. Frame size: %s, frame rate: %d ms, jpeg quality: %d", camera_init_result, param_frame_size.value(), param_frame_duration.value(), param_jpg_quality.value()); if (camera_init_result == ESP_OK)
{
update_camera_settings();
break;
}
log_e("Failed to initialize camera. Error: 0x%0x. Frame size: %s, frame rate: %d ms, jpeg quality: %d", camera_init_result, param_frame_size.value(), param_frame_duration.value(), param_jpg_quality.value());
delay(500);
}
// Set up required URL handlers on the web server // Set up required URL handlers on the web server
web_server.on("/", HTTP_GET, handle_root); web_server.on("/", HTTP_GET, handle_root);