#include "driver/i2c_master.h" #include "board.h" #include "esp32_s3_cam_ovxxxx.h" void app_main(void) { #if ESP_CAMERA_SUPPORTED bsp_i2c_init(); bsp_io_expander_init(); vTaskDelay(pdMS_TO_TICKS(50)); if (init_camera() != ESP_OK) return; #if defined(CONFIG_CAMERA_AF_SUPPORT) && CONFIG_CAMERA_AF_SUPPORT maybe_init_autofocus(); #endif ESP_ERROR_CHECK(audio_init(bsp_i2c_get_handle())); wifi_start_provisioning_if_needed(); // station mode, or the captive portal if no credentials while (!wifi_wait_connected(5000)) { ESP_LOGI("Main", "Waiting for Wi-Fi (or setup portal)..."); } start_camera_server(); // port 80: /pic, /stream xTaskCreate(mic_task, "mic", 6144, NULL, 5, NULL); start_audio_server(); // ports 81 and 82: /mic, /spk, /vol while (1) vTaskDelay(pdMS_TO_TICKS(1000)); #endif }