From ea0c306c19beaade9f8dfc3466788ed17831252e Mon Sep 17 00:00:00 2001 From: Nitek Date: Wed, 12 Dec 2018 14:43:01 +0100 Subject: [PATCH 1/3] Add support for pwdn pin --- components/esp32-camera | 2 +- examples/single_chip/camera_web_server/main/app_camera.c | 1 + .../single_chip/detection_with_command_line/main/app_camera.cpp | 1 + .../recognition_with_command_line/main/app_camera.cpp | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/esp32-camera b/components/esp32-camera index a706668..f8f26ab 160000 --- a/components/esp32-camera +++ b/components/esp32-camera @@ -1 +1 @@ -Subproject commit a7066681bc13d6bce6c3a6162e11ee85720081df +Subproject commit f8f26ab04492c28be5922ac06994a78440ad8258 diff --git a/examples/single_chip/camera_web_server/main/app_camera.c b/examples/single_chip/camera_web_server/main/app_camera.c index dd797dc..b08c31b 100755 --- a/examples/single_chip/camera_web_server/main/app_camera.c +++ b/examples/single_chip/camera_web_server/main/app_camera.c @@ -61,6 +61,7 @@ void app_camera_main () config.pin_href = HREF_GPIO_NUM; config.pin_sscb_sda = SIOD_GPIO_NUM; config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM; config.xclk_freq_hz = 20000000; config.pixel_format = PIXFORMAT_JPEG; diff --git a/examples/single_chip/detection_with_command_line/main/app_camera.cpp b/examples/single_chip/detection_with_command_line/main/app_camera.cpp index d8d113d..b00a171 100644 --- a/examples/single_chip/detection_with_command_line/main/app_camera.cpp +++ b/examples/single_chip/detection_with_command_line/main/app_camera.cpp @@ -45,6 +45,7 @@ void app_camera_init() config.pin_href = HREF_GPIO_NUM; config.pin_sscb_sda = SIOD_GPIO_NUM; config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = -1;//RESET_GPIO_NUM; config.xclk_freq_hz = XCLK_FREQ; config.pixel_format = CAMERA_PIXEL_FORMAT; diff --git a/examples/single_chip/recognition_with_command_line/main/app_camera.cpp b/examples/single_chip/recognition_with_command_line/main/app_camera.cpp index d8d113d..b00a171 100644 --- a/examples/single_chip/recognition_with_command_line/main/app_camera.cpp +++ b/examples/single_chip/recognition_with_command_line/main/app_camera.cpp @@ -45,6 +45,7 @@ void app_camera_init() config.pin_href = HREF_GPIO_NUM; config.pin_sscb_sda = SIOD_GPIO_NUM; config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = -1;//RESET_GPIO_NUM; config.xclk_freq_hz = XCLK_FREQ; config.pixel_format = CAMERA_PIXEL_FORMAT; From 34082ba08628db27061ff0170d1b340a543e9adb Mon Sep 17 00:00:00 2001 From: Nitek Date: Wed, 12 Dec 2018 20:57:37 +0100 Subject: [PATCH 2/3] Make ESP-CAM a predefined build option --- .../camera_web_server/main/Kconfig.projbuild | 2 ++ .../main/include/app_camera.h | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/examples/single_chip/camera_web_server/main/Kconfig.projbuild b/examples/single_chip/camera_web_server/main/Kconfig.projbuild index 37be7ec..8e55b03 100644 --- a/examples/single_chip/camera_web_server/main/Kconfig.projbuild +++ b/examples/single_chip/camera_web_server/main/Kconfig.projbuild @@ -43,6 +43,8 @@ config CAMERA_MODEL_WROVER_KIT bool "WROVER-KIT With OV2640 Module" config CAMERA_MODEL_M5STACK_PSRAM bool "M5Stack Camera With PSRAM" +config CAMERA_MODEL_ESP32_CAM + bool "ESP32-CAM by AI-Thinker" config CAMERA_MODEL_CUSTOM bool "Custom Camera Pinout" endchoice diff --git a/examples/single_chip/camera_web_server/main/include/app_camera.h b/examples/single_chip/camera_web_server/main/include/app_camera.h index 750e0e4..c35edd1 100755 --- a/examples/single_chip/camera_web_server/main/include/app_camera.h +++ b/examples/single_chip/camera_web_server/main/include/app_camera.h @@ -62,6 +62,26 @@ #define HREF_GPIO_NUM 26 #define PCLK_GPIO_NUM 21 +#elif CONFIG_CAMERA_MODEL_ESP32_CAM +#define PWDN_GPIO_NUM 32 +#define RESET_GPIO_NUM -1 +#define XCLK_GPIO_NUM 0 +#define SIOD_GPIO_NUM 26 +#define SIOC_GPIO_NUM 27 + +#define Y9_GPIO_NUM 35 +#define Y8_GPIO_NUM 34 +#define Y7_GPIO_NUM 39 +#define Y6_GPIO_NUM 36 +#define Y5_GPIO_NUM 21 +#define Y4_GPIO_NUM 19 +#define Y3_GPIO_NUM 18 +#define Y2_GPIO_NUM 5 +#define VSYNC_GPIO_NUM 25 +#define HREF_GPIO_NUM 23 +#define PCLK_GPIO_NUM 22 + + #elif CONFIG_CAMERA_MODEL_CUSTOM #define PWDN_GPIO_NUM CONFIG_CAMERA_PIN_PWDN #define RESET_GPIO_NUM CONFIG_CAMERA_PIN_RESET From 4e0aebaa437e8c41fc32381391dffaa28867fa0f Mon Sep 17 00:00:00 2001 From: Nitek Date: Wed, 12 Dec 2018 21:12:15 +0100 Subject: [PATCH 3/3] Rename AI Thinker camera module --- examples/single_chip/camera_web_server/main/Kconfig.projbuild | 2 +- .../single_chip/camera_web_server/main/include/app_camera.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/single_chip/camera_web_server/main/Kconfig.projbuild b/examples/single_chip/camera_web_server/main/Kconfig.projbuild index 8e55b03..f001546 100644 --- a/examples/single_chip/camera_web_server/main/Kconfig.projbuild +++ b/examples/single_chip/camera_web_server/main/Kconfig.projbuild @@ -43,7 +43,7 @@ config CAMERA_MODEL_WROVER_KIT bool "WROVER-KIT With OV2640 Module" config CAMERA_MODEL_M5STACK_PSRAM bool "M5Stack Camera With PSRAM" -config CAMERA_MODEL_ESP32_CAM +config CAMERA_MODEL_AI_THINKER bool "ESP32-CAM by AI-Thinker" config CAMERA_MODEL_CUSTOM bool "Custom Camera Pinout" diff --git a/examples/single_chip/camera_web_server/main/include/app_camera.h b/examples/single_chip/camera_web_server/main/include/app_camera.h index c35edd1..85a3b32 100755 --- a/examples/single_chip/camera_web_server/main/include/app_camera.h +++ b/examples/single_chip/camera_web_server/main/include/app_camera.h @@ -62,7 +62,7 @@ #define HREF_GPIO_NUM 26 #define PCLK_GPIO_NUM 21 -#elif CONFIG_CAMERA_MODEL_ESP32_CAM +#elif CONFIG_CAMERA_MODEL_AI_THINKER #define PWDN_GPIO_NUM 32 #define RESET_GPIO_NUM -1 #define XCLK_GPIO_NUM 0