ESP-IDF
This chapter contains the following sections. Please read as needed:
ESP-IDF Getting Started
New to ESP32 ESP-IDF development and looking to get started quickly? We have prepared a general Getting Started Tutorial for you.
- Section 1: Environment Setup
- Section 2: Running Examples
- Section 3: Creating a Project
- Section 4: Using Components
- Section 5: Debugging
- Section 6: FreeRTOS
- Section 7: Peripherals
- Section 8: Wi-Fi Programming
- Section 9: BLE Programming
Please Note: This tutorial uses the ESP32-S3-Zero as a teaching example, and all hardware code is based on its pinout. Before you start, it is recommended that you check the pinout of your development board to ensure the pin configuration is correct.
Setting Up Development Environment
For the ESP32-S3-CAM-OVxxxx development board, ESP-IDF version V5.5.1 or above is required.
The following guide uses Windows as an example, demonstrating development using VS Code + the ESP-IDF extension. macOS and Linux users should refer to the official documentation.
Install the ESP-IDF Development Environment
-
Download the installation manager from the ESP-IDF Installation Manager page. This is Espressif's latest cross-platform installer. The following steps demonstrate how to use its offline installation feature.
Click the Offline Installer tab on the page, then select Windows as the operating system and choose your desired version from the filter bar.

After confirming your selection, click the download button. The browser will automatically download two files: the ESP-IDF Offline Package (.zst) and the ESP-IDF Installer (.exe).

Please wait for both files to finish downloading.
-
Once the download is complete, double-click to run the ESP-IDF Installer (eim-gui-windows-x64.exe).
The installer will automatically detect if the offline package exists in the same directory. Click Install from archive.

Next, select the installation path. We recommend using the default path. If you need to customize it, ensure the path does not contain Chinese characters or spaces. Click Start installation to proceed.

-
When you see the following screen, the ESP-IDF installation is successful.

-
We recommend installing the drivers as well. Click Finish installation, then select Install driver.

Install Visual Studio Code and the ESP-IDF Extension
-
Download and install Visual Studio Code.
-
During installation, it is recommended to check Add "Open with Code" action to Windows Explorer file context menu to facilitate opening project folders quickly.
-
In VS Code, click the Extensions icon
in the Activity Bar on the side (or use the shortcut Ctrl + Shift + X) to open the Extensions view.
-
Enter ESP-IDF in the search box, locate the ESP-IDF extension, and click Install.

-
For ESP-IDF extension versions ≥ 2.0, the extension will automatically detect and recognize the ESP-IDF environment installed in the previous steps, requiring no manual configuration.
Demo
The ESP-IDF demos are located in the ESP-IDF directory of the demo package.
| Demo | Basic Description |
|---|---|
| 01_simple_video_server | Create multiple HTTP servers on different ports on the local network, accessible via a web browser, providing video streaming functionality |
| 02_esp_sr | Demonstrate speech recognition and voice wake-up functions using the ESP-SR component |
| 03_audio_play | Scan the TF card and play MP3 audio |
| 04_dvp_camera_display | Display the camera feed on the LCD screen |
| 05_lvgl_brookesia | Show LVGL APP style UI using the Brookesia component |
| 06_usb_host_uvc | Simulate a UVC device, demonstrating USB camera functionality |
01_simple_video_server
Demo Description
- This example demonstrates creating an HTTP server, accessing it via a browser, and obtaining a video stream
Hardware Connection
- Connect the development board to the computer
- Camera: Supports GC0308, GC2145, OV5640, OV3660
Code Analysis
example_connect(): Initialize Wi-Fi connection- Set SSID and password in the menuconfig configuration
- Default SSID: WSTEST
- Default password: waveshare0755
start_cam_web_server(): Initialize the HTTP server and camera- Initialize the camera first. If an unsupported camera or format is detected, an error will be reported and the program will exit
- Wait for the camera to initialize successfully, then initialize the HTTP server
Operation Result
- This demo will not light up the screen
- Check the serial monitor for the printed IP address
- Open the IP address in a browser. Ensure you are on the same local network.


02_esp_sr
Demo Description
- This example demonstrates offline voice wake-up and speech recognition using the ESP-SR component
Hardware Connection
- Connect the development board to the computer
- Do not block the microphone
Code Analysis
Speech_Init(): Initialize the microphone and create recognition tasks- Obtain the microphone control handle via
bsp_audio_codec_microphone_init() - Create data reading and detection/recognition tasks
- Obtain the microphone control handle via
Speech_register_callback(): Register a callback function for recognition events- Events can be obtained within the callback function
Operation Result
- This demo will not light up the screen
- Check the serial monitor for voice wake-up and recognition results

03_audio_play
Demo Description
- This example demonstrates playing MP3 audio files from a TF card
Hardware Connection
- Insert a memory card with an MP3 file placed in the root directory
- Connect a speaker
- Connect the development board to the computer
Code Analysis
bsp_io_expander_init();: Initialize the external I/O expander- Initialize the PA control pin to control audio output
bsp_sdcard_mount(): Mount the TF cardSearch_Music(): Search for and save the paths of MP3 files on the TF cardAudio_Play_Init(): Initialize the audio playerVolume_Adjustment(): Set the volume levelAudio_Play_Music(): Play the MP3 file
Operation Result
- This demo will not light up the screen
- After running, it will automatically search for MP3 files on the TF card and play them

04_dvp_camera_display
Demo Description
- This example is an app-style UI + camera demo. Tapping the camera app displays the image on the screen
Hardware Connection
- Connect a DVP camera: Supports GC0308, GC2145, OV5640, OV3660
- Connect a screen, supports 1.83, 2inch, 2.8inch, 3.5inch
- Connect the development board to the computer
Code Analysis
bsp_display_start(): BSP initializes display-related resources- Initialize the LCD screen
- Initialize LVGL
bsp_display_backlight_on(): Turn on the backlightnew ESP_Brookesia_Phone(disp): Initialize the Brookesia componentnew PhoneCameraConf(1,0);: Install the camera app
Operation Result
- Tap the camera app icon, the screen starts displaying the camera image. Tap anywhere on the screen to return to the camera settings interface
![]() | ![]() |
|---|
![]() | ![]() |
|---|
05_lvgl_brookesia
Demo Description
- This example demonstrates a complete phone-style UI system, including components such as a status bar, navigation bar, app launcher, and gesture interaction
Hardware Connection
- Connect a screen, supports 1.83, 2inch, 2.8inch, 3.5inch
- Connect the development board to the computer
Code Analysis
bsp_display_start(): BSP initializes display-related resources- Initialize the LCD screen
- Initialize LVGL
Operation Result
- The display effect is shown on a 2inch screen


06_usb_host_uvc
Demo Description
- This example simulates a UVC device, demonstrating USB camera functionality
Hardware Connection
- Connect a DVP camera: Supports OV5640, OV3660
- Connect the development board to the computer
Code Analysis
uvc_device_config(): Configure UVC device-related interface functionsuvc_device_init(): Start initializing the UVC device
Operation Result
- Open the camera app on your computer to see the image. There may be some latency; wait a moment or try re-powering
- This demo uses the USB programming interface. When programming again, you need to hold the BOOT button to enter download mode




