Răsfoiți Sursa

摄像头配置

xuxinyi 9 luni în urmă
părinte
comite
05a004332a
2 a modificat fișierele cu 28 adăugiri și 8 ștergeri
  1. 4 5
      main/app_main.c
  2. 24 3
      main/camera.c

+ 4 - 5
main/app_main.c

@@ -21,20 +21,19 @@ void app_main(void)
     ESP_ERROR_CHECK(ret);
 
     // 初始化Wi-Fi并连接
-    wifi_init_sta();
+    //wifi_init_sta();
     
     // 等待Wi-Fi连接
-    vTaskDelay(10000 / portTICK_PERIOD_MS);
-
-    //take_photo();
+    //vTaskDelay(10000 / portTICK_PERIOD_MS);
 
+    take_photo();
+    vTaskDelay(4*1000 / portTICK_PERIOD_MS);
     ESP_LOGI(TAG, "测试");
 
     while (true)
     {
         /* code */
         // 执行HTTP GET请求
-        http_get_request();
         vTaskDelay(4*1000 / portTICK_PERIOD_MS);
     }
     

+ 24 - 3
main/camera.c

@@ -46,7 +46,7 @@
 
 #include "esp_camera.h"
 
-#define BOARD_WROVER_KIT 1
+#define ESP32_S3_KORVO 1 //ESP32-S3-KORVO-2_V3.0配套的自定义引脚
 
 // WROVER-KIT PIN Map
 #ifdef BOARD_WROVER_KIT
@@ -112,12 +112,33 @@
 #define CAM_PIN_D6 17
 #define CAM_PIN_D7 16
 #endif
+
+// ESP32-S3-KORVO-2_V3.0 音频开发版
+#ifdef ESP32_S3_KORVO
+#define CAM_PIN_PWDN -1 //没用直接接高
+#define CAM_PIN_RESET -1   //software reset will be performed
+#define CAM_PIN_VSYNC 21
+#define CAM_PIN_HREF 38
+#define CAM_PIN_PCLK 11
+#define CAM_PIN_XCLK 40
+#define CAM_PIN_SIOD 17
+#define CAM_PIN_SIOC 18
+#define CAM_PIN_D0 13
+#define CAM_PIN_D1 47
+#define CAM_PIN_D2 14
+#define CAM_PIN_D3 3
+#define CAM_PIN_D4 12
+#define CAM_PIN_D5 42
+#define CAM_PIN_D6 41
+#define CAM_PIN_D7 39
+#endif
+
 static const char *TAG = "example:take_picture";
 
 #if ESP_CAMERA_SUPPORTED
 static camera_config_t camera_config = {
-    .pin_pwdn = CAM_PIN_PWDN,
-    .pin_reset = CAM_PIN_RESET,
+    //.pin_pwdn = CAM_PIN_PWDN,
+    //.pin_reset = CAM_PIN_RESET,
     .pin_xclk = CAM_PIN_XCLK,
     .pin_sccb_sda = CAM_PIN_SIOD,
     .pin_sccb_scl = CAM_PIN_SIOC,