42 Commits

Author SHA1 Message Date
Rene
346deda2bb Merge pull request #170 from StaticRocket/develop
platformio.ini: add m5stack-timer-cam
2025-04-20 21:09:24 +02:00
Randolph Sapp
e466d592be platformio.ini: add m5stack-timer-cam
Add the m5stack-timer-cam definitions following information from the
board documentation [1] and the board entry on platform.io [2]. Tweak
the upload speed to use a known working value. Mention the X version in
the readme as well since it uses the same board and is just a chassis
change.

[1] https://docs.m5stack.com/en/unit/timercam
[2] ec69109ed6/boards/m5stack-timer-cam.json

Signed-off-by: Randolph Sapp <rs@ti.com>
2025-04-20 02:12:52 -05:00
Rene
32cbc2479d Merge pull request #158 from rzeldent:133-esp32-cam-led-flash-not-working
133-esp32-cam-led-flash-not-working
2025-01-05 13:02:44 +01:00
Rene Zeldenthuis
e93511d0c8 Added functions for flasg from API 2025-01-05 12:38:21 +01:00
Rene Zeldenthuis
8be1484386 Merge branch 'main' into develop 2024-12-29 13:27:29 +01:00
Dominik Rimpf
069e6ff2e7 Add support for M5PoECAM-W (#140)
* add support for M5PoECAM-W (U121-B)

* update documentation for newly added M5PoECAM-W

* update board values for m5poecam-w
2024-08-24 11:32:26 +02:00
Rene Zeldenthuis
fe7195c232 Update with settings from Sheed 2024-03-19 13:49:06 +01:00
Rene Zeldenthuis
383d5803af Merge branch 'main' into develop 2024-03-10 12:47:22 +01:00
Rene Zeldenthuis
c1d92bcb36 Merge branch 'main' into develop 2024-03-10 11:27:10 +01:00
Rene
c61e6cd882 Merge branch 'main' into develop 2024-03-10 11:10:09 +01:00
Rene Zeldenthuis
80a23aa5c4 Updated Markdown 2024-03-10 11:01:38 +01:00
Nick Volgas
e702191382 Fixing missing comma in xiao board json (#114) 2024-02-23 19:42:09 +01:00
absentwallaby
613965e425 Added Freenove wroom-1 n8r8 board (#112)
Co-authored-by: Nick Eales <nick.eales@outlook.com>
2024-02-22 00:12:54 +01:00
Rene Zeldenthuis
a760fdae38 Added sccb_i2c_port
Retry 3 times camera init
2024-02-15 21:22:22 +01:00
Rene
1c2236466d Merge branch 'main' into develop 2024-02-13 14:13:05 +01:00
Rene Zeldenthuis
9ba11162d8 Readded 2024-02-10 00:31:34 +01:00
Rene Zeldenthuis
fd21f32870 Merge branch 'develop' of https://github.com/rzeldent/esp32cam-rtsp into develop 2024-02-10 00:26:39 +01:00
Rene Zeldenthuis
4239de2286 Removed non required depencency 2024-02-10 00:26:37 +01:00
Rene Zeldenthuis
60b602b077 Removed non required depencency 2024-02-10 00:20:34 +01:00
Rene Zeldenthuis
7b4f4c056a Typo 2024-02-07 02:09:06 +01:00
Rene Zeldenthuis
4df6c9469d Added documentation pins for Mems/grove/led 2024-02-07 02:07:23 +01:00
Rene Zeldenthuis
50f4b6f94e USER_LED_ON_LEVEL=LOW 2024-02-07 00:14:55 +01:00
Rene Zeldenthuis
f9336ad803 Corrected HTML for ipv4
fixed Sewrial issue esp32s2
2024-02-07 00:00:41 +01:00
Rene Zeldenthuis
8e5f4ee66c UnitcamS3 2024-02-06 16:16:52 +01:00
Rene Zeldenthuis
138c620296 Added unitcams3 2024-02-05 01:19:04 +01:00
Rene Zeldenthuis
545a824b37 Removed OTA 2024-02-05 00:55:44 +01:00
Rene Zeldenthuis
e8cdf6d044 Work in progress 2024-02-04 23:23:59 +01:00
Rene Zeldenthuis
a90c4fe672 WIP 2024-02-04 20:22:09 +01:00
Rene Zeldenthuis
5bdfc45e3b Work in progress 2024-02-04 17:11:21 +01:00
Rene
d0ef68bbf4 Added M5Stack UnitCamS3 2024-01-28 13:43:31 +01:00
Rene
51c5bf08bc constexpr camera_config_t m5stack_camera_settings 2024-01-28 12:06:25 +01:00
Rene
7f37bff13d - Default value for initResult if initialzation fails 2024-01-17 23:51:03 +01:00
Rene Zeldenthuis
351c6a29d5 Updated README.md 2023-12-19 00:01:14 +01:00
Rene Zeldenthuis
6850c2c47f Merge branch 'feature/seeed_xiao_esp32s3' into develop 2023-12-18 23:47:57 +01:00
Rene Zeldenthuis
9ecdd1c05d Added cache 2023-12-17 02:24:52 +01:00
Rene Zeldenthuis
0809f6baba Updated platformio definitions 2023-12-17 02:21:27 +01:00
Rene
ed293ebb68 Update README.md 2023-10-17 16:14:02 +02:00
Rene Zeldenthuis
5b7d6f9da6 Renamed envirnment name to seeed_xiao_esp32s3 2023-10-07 21:59:41 +02:00
Rene Zeldenthuis
fdc0ddd379 Fixed typos 2023-09-21 09:21:08 +02:00
Rene Zeldenthuis
6917e44287 Updating build system 2023-09-18 23:35:53 +02:00
Rene Zeldenthuis
4360630835 Fixed typo 2023-08-17 01:58:47 +02:00
Rene Zeldenthuis
b3cb7d1bf7 Added seeed_xiao_esp32s3 2023-08-17 01:57:14 +02:00
10 changed files with 235 additions and 62 deletions

View File

@@ -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
@@ -310,22 +312,23 @@ 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 |
| M5STACK_PSRAM | 8Mb |
| M5STACK_V2_PSRAM | Version B only |
| M5STACK_WIDE | 8Mb |
| M5STACK_ESP32CAM | No |
| M5STACK_UNITCAM | No |
| M5STACK_UNITCAMS3 | 8Mb |
| AI_THINKER | 8Mb |
| TTGO_T_JOURNAL | No |
| ESP32_CAM_BOARD | ? |
| ESP32S2_CAM_BOARD | ? |
| ESP32S3_CAM_LCD | ? |
| Board | PSRAM |
|--------------------|----------------|
| WROVER_KIT | 8Mb |
| ESP_EYE | 8Mb |
| ESP32S3_EYE | 8Mb |
| M5STACK_PSRAM | 8Mb |
| M5STACK_V2_PSRAM | Version B only |
| M5STACK_WIDE | 8Mb |
| M5STACK_ESP32CAM | No |
| M5STACK_UNITCAM | No |
| M5STACK_UNITCAMS3 | 8Mb |
| M5STACK_M5PoECAM-W | 8MB |
| AI_THINKER | 8Mb |
| TTGO_T_JOURNAL | No |
| ESP32_CAM_BOARD | ? |
| ESP32S2_CAM_BOARD | ? |
| ESP32S3_CAM_LCD | ? |
Depending on the image resolution, framerate and quality, the PSRAM must be enabled and/or the number of frame buffers increased to keep up with the data generated by the sensor.
There are (a lot of?) boards around with faulty PSRAM. If the camera fails to initialize, this might be a reason. See on [Reddit](https://www.reddit.com/r/esp32/comments/z2hyns/i_have_a_faulty_psram_on_my_esp32cam_what_should/).
@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -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'",

View 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"
}

View File

@@ -20,25 +20,25 @@
"'-D CAMERA_CONFIG_PIN_XCLK=11'",
"'-D CAMERA_CONFIG_PIN_SCCB_SDA=17'",
"'-D CAMERA_CONFIG_PIN_SCCB_SCL=41'",
"'-D CAMERA_CONFIG_PIN_Y9=35'",
"'-D CAMERA_CONFIG_PIN_Y8=34'",
"'-D CAMERA_CONFIG_PIN_Y7=39'",
"'-D CAMERA_CONFIG_PIN_Y6=36'",
"'-D CAMERA_CONFIG_PIN_Y5=19'",
"'-D CAMERA_CONFIG_PIN_Y4=18'",
"'-D CAMERA_CONFIG_PIN_Y3=5'",
"'-D CAMERA_CONFIG_PIN_Y2=4'",
"'-D CAMERA_CONFIG_PIN_VSYNC=25'",
"'-D CAMERA_CONFIG_PIN_HREF=23'",
"'-D CAMERA_CONFIG_PIN_PCLK=22'",
"'-D CAMERA_CONFIG_PIN_Y9=13'",
"'-D CAMERA_CONFIG_PIN_Y8=4'",
"'-D CAMERA_CONFIG_PIN_Y7=10'",
"'-D CAMERA_CONFIG_PIN_Y6=5'",
"'-D CAMERA_CONFIG_PIN_Y5=7'",
"'-D CAMERA_CONFIG_PIN_Y4=16'",
"'-D CAMERA_CONFIG_PIN_Y3=15'",
"'-D CAMERA_CONFIG_PIN_Y2=6'",
"'-D CAMERA_CONFIG_PIN_VSYNC=42'",
"'-D CAMERA_CONFIG_PIN_HREF=18'",
"'-D CAMERA_CONFIG_PIN_PCLK=12'",
"'-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_DRAM'",
"'-D SCCB_I2C_PORT=I2C_NUM_0'",
"'-D I2C_MEMS_SDA=48'",
"'-D I2C_MEMS_SCL=47'",
"'-D I2C_MEMS_SDA=17'",
"'-D I2C_MEMS_SCL=41'",
"'-D TF_CS=9'",
"'-D TF_MOSI=38'",
"'-D TF_CLK=39'",

View 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"
}

Submodule dotnet_riscv deleted from 70e3cb657b

View File

@@ -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
@@ -108,4 +111,7 @@ board = esp32cam_seeed_xiao_esp32s3_sense
board = esp32cam_ttgo_t_camera
[env:esp32cam_ttgo_t_journal]
board = esp32cam_ttgo_t_journal
board = esp32cam_ttgo_t_journal
[env:m5stack-timer-cam]
board = m5stack-timer-cam

View File

@@ -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");
@@ -219,35 +233,35 @@ esp_err_t initialize_camera()
auto jpeg_quality = param_jpg_quality.value();
log_i("Frame duration: %d ms", param_frame_duration.value());
const camera_config_t camera_config = {
.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_xclk = CAMERA_CONFIG_PIN_XCLK, // GPIO pin for camera XCLK line
.pin_sccb_sda = CAMERA_CONFIG_PIN_SCCB_SDA, // GPIO pin for camera SDA line
.pin_sccb_scl = CAMERA_CONFIG_PIN_SCCB_SCL, // GPIO pin for camera SCL line
.pin_d7 = CAMERA_CONFIG_PIN_Y9, // GPIO pin for camera D7 line
.pin_d6 = CAMERA_CONFIG_PIN_Y8, // GPIO pin for camera D6 line
.pin_d5 = CAMERA_CONFIG_PIN_Y7, // GPIO pin for camera D5 line
.pin_d4 = CAMERA_CONFIG_PIN_Y6, // GPIO pin for camera D4 line
.pin_d3 = CAMERA_CONFIG_PIN_Y5, // GPIO pin for camera D3 line
.pin_d2 = CAMERA_CONFIG_PIN_Y4, // GPIO pin for camera D2 line
.pin_d1 = CAMERA_CONFIG_PIN_Y3, // GPIO pin for camera D1 line
.pin_d0 = CAMERA_CONFIG_PIN_Y2, // GPIO pin for camera D0 line
.pin_vsync = CAMERA_CONFIG_PIN_VSYNC, // GPIO pin for camera VSYNC line
.pin_href = CAMERA_CONFIG_PIN_HREF, // GPIO pin for camera HREF line
.pin_pclk = CAMERA_CONFIG_PIN_PCLK, // GPIO pin for camera PCLK line
.xclk_freq_hz = CAMERA_CONFIG_CLK_FREQ_HZ, // Frequency of XCLK signal, in Hz. EXPERIMENTAL: Set to 16MHz on ESP32-S2 or ESP32-S3 to enable EDMA mode
.ledc_timer = CAMERA_CONFIG_LEDC_TIMER, // LEDC timer to be used for generating XCLK
.ledc_channel = CAMERA_CONFIG_LEDC_CHANNEL, // LEDC channel to be used for generating XCLK
.pixel_format = PIXFORMAT_JPEG, // Format of the pixel data: PIXFORMAT_ + YUV422|GRAYSCALE|RGB565|JPEG
.frame_size = frame_size, // Size of the output image: FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA
.jpeg_quality = jpeg_quality, // Quality of JPEG output. 0-63 lower means higher quality
.fb_count = CAMERA_CONFIG_FB_COUNT, // Number of frame buffers to be allocated. If more than one, then each frame will be acquired (double speed)
.fb_location = CAMERA_CONFIG_FB_LOCATION, // The location where the frame buffer will be allocated
.grab_mode = CAMERA_GRAB_LATEST, // When buffers should be filled
.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_xclk = CAMERA_CONFIG_PIN_XCLK, // GPIO pin for camera XCLK line
.pin_sccb_sda = CAMERA_CONFIG_PIN_SCCB_SDA, // GPIO pin for camera SDA line
.pin_sccb_scl = CAMERA_CONFIG_PIN_SCCB_SCL, // GPIO pin for camera SCL line
.pin_d7 = CAMERA_CONFIG_PIN_Y9, // GPIO pin for camera D7 line
.pin_d6 = CAMERA_CONFIG_PIN_Y8, // GPIO pin for camera D6 line
.pin_d5 = CAMERA_CONFIG_PIN_Y7, // GPIO pin for camera D5 line
.pin_d4 = CAMERA_CONFIG_PIN_Y6, // GPIO pin for camera D4 line
.pin_d3 = CAMERA_CONFIG_PIN_Y5, // GPIO pin for camera D3 line
.pin_d2 = CAMERA_CONFIG_PIN_Y4, // GPIO pin for camera D2 line
.pin_d1 = CAMERA_CONFIG_PIN_Y3, // GPIO pin for camera D1 line
.pin_d0 = CAMERA_CONFIG_PIN_Y2, // GPIO pin for camera D0 line
.pin_vsync = CAMERA_CONFIG_PIN_VSYNC, // GPIO pin for camera VSYNC line
.pin_href = CAMERA_CONFIG_PIN_HREF, // GPIO pin for camera HREF line
.pin_pclk = CAMERA_CONFIG_PIN_PCLK, // GPIO pin for camera PCLK line
.xclk_freq_hz = CAMERA_CONFIG_CLK_FREQ_HZ, // Frequency of XCLK signal, in Hz. EXPERIMENTAL: Set to 16MHz on ESP32-S2 or ESP32-S3 to enable EDMA mode
.ledc_timer = CAMERA_CONFIG_LEDC_TIMER, // LEDC timer to be used for generating XCLK
.ledc_channel = CAMERA_CONFIG_LEDC_CHANNEL, // LEDC channel to be used for generating XCLK
.pixel_format = PIXFORMAT_JPEG, // Format of the pixel data: PIXFORMAT_ + YUV422|GRAYSCALE|RGB565|JPEG
.frame_size = frame_size, // Size of the output image: FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA
.jpeg_quality = jpeg_quality, // Quality of JPEG output. 0-63 lower means higher quality
.fb_count = CAMERA_CONFIG_FB_COUNT, // Number of frame buffers to be allocated. If more than one, then each frame will be acquired (double speed)
.fb_location = CAMERA_CONFIG_FB_LOCATION, // The location where the frame buffer will be allocated
.grab_mode = CAMERA_GRAB_LATEST, // When buffers should be filled
#if CONFIG_CAMERA_CONVERTER_ENABLED
conv_mode = CONV_DISABLE, // RGB<->YUV Conversion mode
conv_mode = CONV_DISABLE, // RGB<->YUV Conversion mode
#endif
.sccb_i2c_port = SCCB_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);
@@ -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(); });
}