mirror of
https://github.com/rzeldent/esp32cam-rtsp.git
synced 2025-11-12 19:26:22 +00:00
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:
44
README.md
44
README.md
@@ -100,18 +100,18 @@ To select the right board use the table below and use the configuration that is
|
|||||||
| Board | Image | CPU | SRAM | Flash | PSRAM | Camera | | Site |
|
| Board | Image | CPU | SRAM | Flash | PSRAM | Camera | | Site |
|
||||||
|--- |--- |--- |--- |--- | --- |--- |--- |--- |
|
|--- |--- |--- |--- |--- | --- |--- |--- |--- |
|
||||||
| Espressif ESP32-Wrover CAM |  | ESP32 | 520KB | 4Mb | 4MB | OV2640 | | |
|
| Espressif ESP32-Wrover CAM |  | ESP32 | 520KB | 4Mb | 4MB | OV2640 | | |
|
||||||
| AI-Thinker ESP32-CAM |   | ESP32-S | 520KB | 4Mb | 4MB | OV2640 | | https://docs.ai-thinker.com/esp32-cam |
|
| AI-Thinker ESP32-CAM |   | ESP32-S | 520KB | 4Mb | 4MB | OV2640 | | [https://docs.ai-thinker.com/esp32-cam](https://docs.ai-thinker.com/esp32-cam) |
|
||||||
| Espressif ESP-EYE |  | ESP32 | 520KB | 4Mb | 4MB | OV2640 | | |
|
| Espressif ESP-EYE |  | ESP32 | 520KB | 4Mb | 4MB | OV2640 | | |
|
||||||
| Espressif ESP-S3-EYE |  | ESP32-S3 | 520KB | 4Mb | 4MB | OV2640 | | https://www.espressif.com/en/products/devkits/esp-eye/overview |
|
| Espressif ESP-S3-EYE |  | 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 |  | ESP32 Wrover | 520KB | 4Mb | 4MB | OV2640 / OV5640 | | |
|
| LilyGo camera module |  | ESP32 Wrover | 520KB | 4Mb | 4MB | OV2640 / OV5640 | | |
|
||||||
| LilyGo Simcam |  | | | | | OV2640 | | |
|
| LilyGo Simcam |  | | | | | OV2640 | | |
|
||||||
| LilyGo TTGO-T Camera |  | | | | | OV2640 | | |
|
| LilyGo TTGO-T Camera |  | | | | | OV2640 | | |
|
||||||
| M5Stack ESP32CAM |  | ESP32 | 520Kb | 4Mb | - | OV2640 | Microphone | https://docs.m5stack.com/en/unit/esp32cam |
|
| M5Stack ESP32CAM |  | ESP32 | 520Kb | 4Mb | - | OV2640 | Microphone | [https://docs.m5stack.com/en/unit/esp32cam](https://docs.m5stack.com/en/unit/esp32cam) |
|
||||||
| M5Stack UnitCam |   | ESP32-WROOM-32E | 520KB | 4Mb | - | OV2640 | | https://docs.m5stack.com/en/unit/unit_cam |
|
| M5Stack UnitCam |   | ESP32-WROOM-32E | 520KB | 4Mb | - | OV2640 | | [https://docs.m5stack.com/en/unit/unit_cam](https://docs.m5stack.com/en/unit/unit_cam) |
|
||||||
| M5Stack Camera |  | ESP32 | 520Kb | 4Mb | - | OV2640 | | https://docs.m5stack.com/en/unit/m5camera |
|
| M5Stack Camera |  | ESP32 | 520Kb | 4Mb | - | OV2640 | | [https://docs.m5stack.com/en/unit/m5camera](https://docs.m5stack.com/en/unit/m5camera) |
|
||||||
| M5Stack Camera PSRAM |  | ESP32 | 520Kb | 4Mb | 4Mb | OV2640 | | https://docs.m5stack.com/en/unit/m5camera |
|
| M5Stack Camera PSRAM |  | ESP32 | 520Kb | 4Mb | 4Mb | OV2640 | | [https://docs.m5stack.com/en/unit/m5camera](https://docs.m5stack.com/en/unit/m5camera) |
|
||||||
| M5Stack UnitCamS3 |   | ESP32-S3-WROOM-1-N16R8 | 520Kb | 16Mb | 8Mb | OV2640 | | https://docs.m5stack.com/en/unit/Unit-CamS3 |
|
| M5Stack UnitCamS3 |   | 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 |  | ESP32-S3R8 | 520KB | 8Mb | 8MB | OV2640 | Microphone | https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html |
|
| Seeed studio Xiao ESP32S3 Sense |  | 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
|
||||||
|
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
70
boards/esp32cam_freenove_s3_wroom_n8r8.json
Normal file
70
boards/esp32cam_freenove_s3_wroom_n8r8.json
Normal 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"
|
||||||
|
}
|
||||||
@@ -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",
|
||||||
|
|||||||
@@ -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'"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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'"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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'"
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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'",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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'",
|
||||||
|
|||||||
@@ -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'",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
16
src/main.cpp
16
src/main.cpp
@@ -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();
|
||||||
|
|
||||||
|
// Try to initialize 3 times
|
||||||
|
for (auto i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
camera_init_result = initialize_camera();
|
camera_init_result = initialize_camera();
|
||||||
if (camera_init_result == ESP_OK)
|
if (camera_init_result == ESP_OK)
|
||||||
|
{
|
||||||
update_camera_settings();
|
update_camera_settings();
|
||||||
else
|
break;
|
||||||
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());
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user