forked from external-repos/esp32cam-rtsp
Compare commits
10 Commits
106-create
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
346deda2bb | ||
|
|
e466d592be | ||
|
|
32cbc2479d | ||
|
|
e93511d0c8 | ||
|
|
8be1484386 | ||
|
|
a4c6d60279 | ||
|
|
45d08d08ce | ||
|
|
0eb4ddfe69 | ||
|
|
7a5abd3235 | ||
|
|
069e6ff2e7 |
11
README.md
11
README.md
@@ -42,6 +42,8 @@ This software supports the following ESP32-CAM (and alike) modules:
|
||||
- M5STACK_V2_PSRAM
|
||||
- M5STACK_PSRAM
|
||||
- M5STACK_WIDE
|
||||
- M5STACK M5PoECAM-W
|
||||
- M5STACK Timer CAM (Original and X)
|
||||
- M5STACK
|
||||
- Seeed Studio XIAO ESP32S3 SENSE
|
||||
- TTGO T-CAMERA
|
||||
@@ -100,7 +102,7 @@ To select the right board use the table below and use the configuration that is
|
||||
| Board | Image | CPU | SRAM | Flash | PSRAM | Camera | | Site |
|
||||
|--- |--- |--- |--- |--- | --- |--- |--- |--- |
|
||||
| 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](https://docs.ai-thinker.com/esp32-cam) |
|
||||
| AI-Thinker ESP32-CAM |   | ESP32 | 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-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 | | |
|
||||
@@ -151,7 +153,7 @@ cd esp32cam-rtsp
|
||||
```
|
||||
|
||||
Next, the firmware has to be build and deployed to the ESP32.
|
||||
There are to flavours to do this; using the command line or the graphical interface of Visual Studio Code.
|
||||
There are two flavours to do this; using the command line or the graphical interface of Visual Studio Code.
|
||||
|
||||
### Using the command line
|
||||
|
||||
@@ -311,7 +313,7 @@ The availability of PSRAM can be seen in the HTML status overview.
|
||||
Not all the boards are equipped with PSRAM:
|
||||
|
||||
| Board | PSRAM |
|
||||
|--- |--- |
|
||||
|--------------------|----------------|
|
||||
| WROVER_KIT | 8Mb |
|
||||
| ESP_EYE | 8Mb |
|
||||
| ESP32S3_EYE | 8Mb |
|
||||
@@ -321,6 +323,7 @@ Not all the boards are equipped with PSRAM:
|
||||
| M5STACK_ESP32CAM | No |
|
||||
| M5STACK_UNITCAM | No |
|
||||
| M5STACK_UNITCAMS3 | 8Mb |
|
||||
| M5STACK_M5PoECAM-W | 8MB |
|
||||
| AI_THINKER | 8Mb |
|
||||
| TTGO_T_JOURNAL | No |
|
||||
| ESP32_CAM_BOARD | ? |
|
||||
@@ -357,6 +360,8 @@ esp32cam-rtsp depends on PlatformIO, Bootstrap 5 and Micro-RTSP by Kevin Hester.
|
||||
|
||||
## Change history
|
||||
|
||||
- August 2024
|
||||
- Added support for M5Stack M5PoECAM-W
|
||||
- January 2024
|
||||
- Moved settings to board definitions
|
||||
- Added new boards
|
||||
|
||||
BIN
assets/boards/m5stack_m5poecam-w_back.webp
Normal file
BIN
assets/boards/m5stack_m5poecam-w_back.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
BIN
assets/boards/m5stack_m5poecam-w_front.webp
Normal file
BIN
assets/boards/m5stack_m5poecam-w_front.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -9,6 +9,7 @@
|
||||
"'-D ESP32CAM_AI_THINKER'",
|
||||
"'-D BOARD_HAS_PSRAM'",
|
||||
"'-mfix-esp32-psram-cache-issue'",
|
||||
"'-D FLASH_LED_GPIO=4'",
|
||||
"'-D USER_LED_GPIO=33'",
|
||||
"'-D USER_LED_ON_LEVEL=LOW'",
|
||||
"'-D CAMERA_CONFIG_PIN_PWDN=32'",
|
||||
|
||||
68
boards/esp32cam_m5stack_m5poecam_w.json
Normal file
68
boards/esp32cam_m5stack_m5poecam_w.json
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld",
|
||||
"partitions": "default_8MB.csv"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": [
|
||||
"'-D ESP32CAM_M5STACK_M5POECAM'",
|
||||
"'-D BOARD_HAS_PSRAM'",
|
||||
"'-D USER_LED_GPIO=0'",
|
||||
"'-D USER_LED_ON_LEVEL=LOW'",
|
||||
"'-mfix-esp32-psram-cache-issue'",
|
||||
"'-D CAMERA_CONFIG_PIN_PWDN=GPIO_NUM_NC'",
|
||||
"'-D CAMERA_CONFIG_PIN_RESET=15'",
|
||||
"'-D CAMERA_CONFIG_PIN_XCLK=27'",
|
||||
"'-D CAMERA_CONFIG_PIN_SCCB_SDA=14'",
|
||||
"'-D CAMERA_CONFIG_PIN_SCCB_SCL=12'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y9=19'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y8=36'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y7=18'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y6=39'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y5=5'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y4=34'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y3=35'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y2=32'",
|
||||
"'-D CAMERA_CONFIG_PIN_VSYNC=22'",
|
||||
"'-D CAMERA_CONFIG_PIN_HREF=26'",
|
||||
"'-D CAMERA_CONFIG_PIN_PCLK=21'",
|
||||
"'-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'",
|
||||
"'-D SCCB_I2C_PORT=I2C_NUM_0'",
|
||||
"'-D GROVE_SDA=25'",
|
||||
"'-D GROVE_SCL=33'"
|
||||
],
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
"variant": "esp32"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_board": "esp-wroom-32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "ESP32-CAM M5STACK M5PoECAM-W",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.m5stack.com/en/unit/poecam-w",
|
||||
"vendor": "M5STACK"
|
||||
}
|
||||
69
boards/m5stack-timer-cam.json
Normal file
69
boards/m5stack-timer-cam.json
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld",
|
||||
"partitions": "huge_app.csv"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": [
|
||||
"'-D ARDUINO_M5Stack_Timer_CAM'",
|
||||
"'-D BOARD_HAS_PSRAM'",
|
||||
"'-mfix-esp32-psram-cache-issue'",
|
||||
"'-mfix-esp32-psram-cache-strategy=memw'",
|
||||
"'-D USER_LED_GPIO=2'",
|
||||
"'-D USER_LED_ON_LEVEL=HIGH'",
|
||||
"'-D CAMERA_CONFIG_PIN_PWDN=GPIO_NUM_NC'",
|
||||
"'-D CAMERA_CONFIG_PIN_RESET=15'",
|
||||
"'-D CAMERA_CONFIG_PIN_XCLK=27'",
|
||||
"'-D CAMERA_CONFIG_PIN_SCCB_SDA=25'",
|
||||
"'-D CAMERA_CONFIG_PIN_SCCB_SCL=23'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y9=19'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y8=36'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y7=18'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y6=39'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y5=5'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y4=34'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y3=35'",
|
||||
"'-D CAMERA_CONFIG_PIN_Y2=32'",
|
||||
"'-D CAMERA_CONFIG_PIN_VSYNC=22'",
|
||||
"'-D CAMERA_CONFIG_PIN_HREF=26'",
|
||||
"'-D CAMERA_CONFIG_PIN_PCLK=21'",
|
||||
"'-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'",
|
||||
"'-D SCCB_I2C_PORT=I2C_NUM_0'",
|
||||
"'-D GROVE_SDA=4'",
|
||||
"'-D GROVE_SCL=13'"
|
||||
],
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "40000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
"variant": "m5stack_timer_cam"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_board": "esp-wroom-32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "M5Stack Timer CAM",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 115200
|
||||
},
|
||||
"url": "https://docs.m5stack.com/en/unit/timercam",
|
||||
"vendor": "M5STACK"
|
||||
}
|
||||
@@ -20,10 +20,10 @@
|
||||
#default_envs = esp32cam_m5stack_camera_psram
|
||||
#default_envs = esp32cam_m5stack_camera
|
||||
#default_envs = esp32cam_m5stack_esp32cam
|
||||
|
||||
#default_envs = esp32cam_m5stack_unitcam
|
||||
#default_envs = esp32cam_m5stack_unitcams3
|
||||
#default_envs = esp32cam_m5stack_wide
|
||||
#default_envs = esp32cam_m5stack_m5poecam_w
|
||||
#default_envs = esp32cam_seeed_xiao_esp32s3_sense
|
||||
#default_envs = esp32cam_ttgo_t_camera
|
||||
#default_envs = esp32cam_ttgo_t_journal
|
||||
@@ -101,6 +101,9 @@ board = esp32cam_m5stack_unitcams3
|
||||
[env:esp32cam_m5stack_wide]
|
||||
board = esp32cam_m5stack_wide
|
||||
|
||||
[env:esp32cam_m5stack_m5poecam_w]
|
||||
board = esp32cam_m5stack_m5poecam_w
|
||||
|
||||
[env:esp32cam_seeed_xiao_esp32s3_sense]
|
||||
board = esp32cam_seeed_xiao_esp32s3_sense
|
||||
|
||||
@@ -109,3 +112,6 @@ board = esp32cam_ttgo_t_camera
|
||||
|
||||
[env:esp32cam_ttgo_t_journal]
|
||||
board = esp32cam_ttgo_t_journal
|
||||
|
||||
[env:m5stack-timer-cam]
|
||||
board = m5stack-timer-cam
|
||||
|
||||
31
src/main.cpp
31
src/main.cpp
@@ -150,6 +150,20 @@ void handle_root()
|
||||
web_server.send(200, "text/html", html);
|
||||
}
|
||||
|
||||
#ifdef FLASH_LED_GPIO
|
||||
void handle_flash()
|
||||
{
|
||||
log_v("handle_flash");
|
||||
// If no value present, use off, otherwise convert v to integer. Depends on analog resolution for max value
|
||||
auto v = web_server.hasArg("v") ? web_server.arg("v").toInt() : 0;
|
||||
// If conversion fails, v = 0
|
||||
analogWrite(FLASH_LED_GPIO, v);
|
||||
|
||||
web_server.sendHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
web_server.send(200);
|
||||
}
|
||||
#endif
|
||||
|
||||
void handle_snapshot()
|
||||
{
|
||||
log_v("handle_snapshot");
|
||||
@@ -316,13 +330,21 @@ void setup()
|
||||
// Disable brownout
|
||||
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);
|
||||
|
||||
Serial.begin(115200);
|
||||
Serial.setDebugOutput(true);
|
||||
|
||||
#ifdef USER_LED_GPIO
|
||||
pinMode(USER_LED_GPIO, OUTPUT);
|
||||
digitalWrite(USER_LED_GPIO, !USER_LED_ON_LEVEL);
|
||||
#endif
|
||||
|
||||
Serial.begin(115200);
|
||||
Serial.setDebugOutput(true);
|
||||
#ifdef FLASH_LED_GPIO
|
||||
pinMode(FLASH_LED_GPIO, OUTPUT);
|
||||
// Set resolution to 8 bits
|
||||
analogWriteResolution(8);
|
||||
// Turn flash led off
|
||||
analogWrite(FLASH_LED_GPIO, 0);
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_USB_CDC_ON_BOOT
|
||||
// Delay for USB to connect/settle
|
||||
@@ -397,7 +419,10 @@ void setup()
|
||||
web_server.on("/snapshot", HTTP_GET, handle_snapshot);
|
||||
// Camera stream
|
||||
web_server.on("/stream", HTTP_GET, handle_stream);
|
||||
|
||||
#ifdef FLASH_LED_GPIO
|
||||
// Flash led
|
||||
web_server.on("/flash", HTTP_GET, handle_flash);
|
||||
#endif
|
||||
web_server.onNotFound([]()
|
||||
{ iotWebConf.handleNotFound(); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user