#include "driver/i2c_master.h" #include "board.h" #include "esp32_s3_cam_ovxxxx.h" #include "cam_stream.h" #define CAM_USER "admin" #define CAM_PASS "ChangeThis123" 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())); ESP_ERROR_CHECK(cam_feed_start()); 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)..."); } cam_auth_init(CAM_USER, CAM_PASS); 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 rtsp_set_speaker_sink(rtsp_speaker_sink); rtsp_server_start(); while (1) vTaskDelay(pdMS_TO_TICKS(1000)); #endif }