Google Chat:---
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
WhatsApp:13424403025



This chapter contains the following sections. Please read as needed:
New to Arduino ESP32 development and looking for a quick start? We have prepared a comprehensive Getting Started Tutorial for you.
Note: This tutorial uses the ESP32-S3-Zero as a reference example, and all hardware code is based on its pinout. Before you start, we recommend checking the pinout of your development board to ensure the pin configuration is correct.
Please refer to the tutorial Installing and Configuring Arduino IDE to download and install the Arduino IDE and add ESP32 support.
Board Installation Instructions for ESP32-S3-ePaper-13.3E6
| Board Name | Installation Requirement | Version Requirement |
|---|---|---|
| ESP32 by Espressif Systems | "Install Offline" / "Install Online" | 3.2.0 |

The Arduino demos are located in the Arduino/examples directory of the demo package.
| Demo | Basic Program Description | Dependency Library |
|---|---|---|
| 01_ADC_Test | Get the voltage value of the lithium battery | - |
| 02_Audio_out | Audio playback example | - |
| 03_E-Paper_Example | 13.3inch e-Paper E6 e‑paper screen example program | - |
| 04_SD_Test | Read TF card and display images | - |
| 05_Loader_esp32wf | WiFi image transfer example | - |
Demo Description
Hardware Connection
Code Analysis
adc_bsp_init(void): Initializes ADC1, including creating an ADC one-shot trigger unit and configuring Channel 7 of ADC1.adc_get_value(float *value,int *data): Reads the value from Channel 7 of ADC1, calculates the corresponding voltage based on the reference voltage and resolution, and stores it at the location pointed to by the passed pointer. Stores 0 if the read fails.adc_example(void* parameter): After initializing ADC1, creates an ADC task. This task reads the ADC value every second and calculates the system voltage from the raw ADC reading.Operation Result

Demo Description
Hardware Connection
Code Analysis
Configure and initialize the ES8311 audio codec.
void setup() {
Serial.begin(115200);
Wire.begin(I2C_SDA, I2C_SCL);
pinMode(PA_CTRL, OUTPUT);
digitalWrite(PA_CTRL, HIGH);
es8311_codec_init();
setupI2S();
Serial.println("I2S Initialized");
}
Continuously write built-in audio data to the I2S bus for looped playback.
i2s.write((uint8_t *)audio_data, AUDIO_SAMPLES * 2);
Operation Result
Demo Description
Hardware Connection
Code Analysis
Display a predefined image.
#if 1 // show bmp
printf("show bmp1-----------------\r\n");
EPD_13IN3E_Display(Image6color);
DEV_Delay_ms(3000);
#endif
Draw basic shapes, Chinese/English text, numbers, and refresh the display.
#if 1 // Drawing on the image
Paint_NewImage(Image, EPD_13IN3E_WIDTH, EPD_13IN3E_HEIGHT, 90, EPD_13IN3E_WHITE);
Paint_SetScale(6);
//1.Select Image
printf("SelectImage:Image\r\n");
Paint_SelectImage(Image);
Paint_Clear(EPD_13IN3E_WHITE);
// 2.Drawing on the image
printf("Drawing:Image\r\n");
Paint_DrawPoint(10, 80, EPD_13IN3E_RED, DOT_PIXEL_1X1, DOT_STYLE_DFT);
Paint_DrawPoint(10, 90, EPD_13IN3E_BLUE, DOT_PIXEL_2X2, DOT_STYLE_DFT);
Paint_DrawPoint(10, 100, EPD_13IN3E_GREEN, DOT_PIXEL_3X3, DOT_STYLE_DFT);
Paint_DrawLine(20, 70, 70, 120, EPD_13IN3E_YELLOW, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
Paint_DrawLine(70, 70, 20, 120, EPD_13IN3E_YELLOW, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
Paint_DrawRectangle(20, 70, 70, 120, EPD_13IN3E_BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
Paint_DrawRectangle(80, 70, 130, 120, EPD_13IN3E_BLACK, DOT_PIXEL_1X1, DRAW_FILL_FULL);
Paint_DrawCircle(45, 95, 20, EPD_13IN3E_BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
Paint_DrawCircle(105, 95, 20, EPD_13IN3E_WHITE, DOT_PIXEL_1X1, DRAW_FILL_FULL);
Paint_DrawLine(85, 95, 125, 95, EPD_13IN3E_YELLOW, DOT_PIXEL_1X1, LINE_STYLE_DOTTED);
Paint_DrawLine(105, 75, 105, 115, EPD_13IN3E_YELLOW, DOT_PIXEL_1X1, LINE_STYLE_DOTTED);
Paint_DrawString_CN(10, 130, "你好 abc", &Font12CN, EPD_13IN3E_BLACK, EPD_13IN3E_WHITE);
Paint_DrawString_CN(10, 150, "微雪电子", &Font24CN, EPD_13IN3E_WHITE, EPD_13IN3E_BLACK);
Paint_DrawNum(10, 33, 123456789, &Font12, EPD_13IN3E_BLACK, EPD_13IN3E_WHITE);
Paint_DrawNum(10, 50, 987654321, &Font16, EPD_13IN3E_WHITE, EPD_13IN3E_BLACK);
Paint_DrawString_EN(145, 0, "Waveshare", &Font16, EPD_13IN3E_BLACK, EPD_13IN3E_WHITE);
Paint_DrawString_EN(145, 35, "Waveshare", &Font16, EPD_13IN3E_GREEN, EPD_13IN3E_WHITE);
Paint_DrawString_EN(145, 70, "Waveshare", &Font16, EPD_13IN3E_BLUE, EPD_13IN3E_WHITE);
Paint_DrawString_EN(145, 105, "Waveshare", &Font16, EPD_13IN3E_RED, EPD_13IN3E_WHITE);
Paint_DrawString_EN(145, 140, "Waveshare", &Font16, EPD_13IN3E_YELLOW, EPD_13IN3E_WHITE);
printf("EPD_Display\r\n");
EPD_13IN3E_Display(Image);
DEV_Delay_ms(3000);
#endif
Operation Result
![]() ![]() |
|---|
Demo Description
Hardware Connection
Code Analysis
Configure and mount the TF card.
//sdcard init
Serial.begin(115200);
delay(1000);
SD_MMC.setPins(SD_CLK, SD_CMD, SD_D0, SD_D1, SD_D2, SD_D3);
if (!SD_MMC.begin( "/sdcard", true)) {
printf("TF card failed to mount\r\n");
return;
}
printf("TF card success to mount\r\n");
Read .bmp images from the bmp folder on the TF card.
Serial.println("Scan the root directory BMP file...");
File rootDir = SD_MMC.open("/bmp");
if (rootDir && rootDir.isDirectory()) {
File file = rootDir.openNextFile();
while (file && bmpFileCount < 32) {
if (!file.isDirectory()) {
String fileName = file.name();
String fullPath = file.path();
fileName.toLowerCase();
if (fileName.endsWith(".bmp")) {
bmpFilePaths[bmpFileCount++] = MOUNT_POINT + fullPath;
Serial.printf("find BMP:%s\n", fullPath.c_str());
}
}
file.close();
file = rootDir.openNextFile();
}
rootDir.close();
}else{
Serial.println("error : failed to open the root directory!");
}
Operation Result


Demo Description
This module only supports the 2.4GHz network band.
Hardware Connection
Code Modification
Open the srvr.h file and change the ssid and password to the actual WiFi username and password being used.
Modify the Wi-Fi username and password at this location to your own router's or mobile hotspot's Wi-Fi credentials. In this program, the ESP32 acts as a client (slave), not an access point; it does not broadcast its own Wi-Fi hotspot.

Press Win + R, type CMD, and open the command prompt to obtain the computer's IP address.


Open the srvr.h file and modify the network segment shown in the image to match your network segment.
The ESP32's IP address (the last octet) must be different from the computer's IP address, but the other three octets must be exactly the same.

Then click Upload to compile and download the program to the ESP32 driver board.
Open the Serial Monitor, set the baud rate to 115200, and you will see the ESP32's IP address printed:

On a computer or mobile phone (ensure the device is connected to the same WiFi network as the ESP32), open a browser, enter the ESP32's IP address in the address bar, and open it. The operation interface will appear as shown below:

The interface is divided into five areas: Image Operation Area:
Select Image file: Click to select an image from the computer or phoneLevel: mono: Black‑and‑white color‑level image processing algorithmLevel: color: Multi‑color color‑level image processing algorithm (effective only for multi‑color screens)Dithering: mono: Black‑and‑white dithering image processing algorithmDithering: color: Multi‑color dithering image processing algorithm (effective only for multi‑color screens)Update image: Upload the imageIf you change the x and y values, you need to click the processing algorithm button again to regenerate the image.
While uploading an image, the progress will be shown at the bottom.
In area ①, click Select image file to choose an image, or simply drag and drop an image into the Original image area.
In area ④, select the corresponding e‑Paper screen model, e.g., 13.3E
In area ①, click an image processing algorithm, e.g., Dithering: color
In area ①, click Upload image to upload the image and display it on the e‑paper screen.

This chapter contains the following sections. Please read as needed:
New to ESP32 ESP-IDF development and looking to get started quickly? We have prepared a general Getting Started Tutorial for you.
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.
For the ESP32-S3-ePaper-Driver-Board development board, ESP-IDF version V5.5.0 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.
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.

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.
The ESP-IDF demos are located in the ESP-IDF directory of the demo package.
| Demo | Basic Description |
|---|---|
| 01_ADC_Test | Get the lithium battery voltage value |
| 02_Mic_test | Play microphone recording through the speaker |
| 03_Music | Mount TF card and read/play music files from it |
| 04_E-Paper_Example | e‑Paper example program |
| 05_SD_Test | Read TF card and display images |
| 06_xiaozhi-esp32 | Xiaozhi AI application |
Demo Description
Hardware Connection
Code Analysis
adc_bsp_init(void): Initializes ADC1, including creating an ADC one-shot trigger unit and configuring Channel 7 of ADC1.adc_get_value(float *value,int *data): Reads the value from Channel 7 of ADC1, calculates the corresponding voltage based on the reference voltage and resolution, and stores it at the location pointed to by the passed pointer. Stores 0 if the read fails.adc_example(void* parameter): After initializing ADC1, creates an ADC task. This task reads the ADC value every second and calculates the system voltage from the raw ADC reading.Operation Result

Code Analysis
i2c_master_Init();: Initializes the I2C bus.user_ui_init();: Initializes the global UI.user_button_init();: Initializes the audio interface.The screen shows nothing.
Long press the BOOT button to enter recording mode. Speak into the MIC, and it will automatically stop after 3 seconds.
Click the BOOT button to play the recorded sound. (If no recording exists, the played sound will be very harsh.)
Serial port prints:

Code Analysis
_sdcard_init();: Initializes the TF card and reads the audio files from it.i2c_master_init();: Initializes the I2C bus, providing a communication link for configuration command transmission to the ES8311 audio codec.audio_player_play(audio_fp);: Starts the audio player, reads the opened MP3 file, and drives the speaker through the ES8311 for playback.Code Analysis
Display a predefined image:
#if 1
EPD_Display(Image6color);
vTaskDelay(pdMS_TO_TICKS(3000));
#endif
Draw basic shapes, Chinese/English text, numbers, and refresh the display:
#if 1
Paint_NewImage(Image_Mono, EPD_WIDTH, EPD_HEIGHT, 90, EPD_WHITE);
Paint_SetScale(6);
printf("SelectImage:Image\r\n");
Paint_SelectImage(Image_Mono);
Paint_Clear(EPD_WHITE);
Paint_DrawPoint(10, 80, EPD_RED, DOT_PIXEL_1X1, DOT_STYLE_DFT);
Paint_DrawPoint(10, 90, EPD_BLUE, DOT_PIXEL_2X2, DOT_STYLE_DFT);
Paint_DrawPoint(10, 100, EPD_GREEN, DOT_PIXEL_3X3, DOT_STYLE_DFT);
Paint_DrawLine(20, 70, 70, 120, EPD_YELLOW, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
Paint_DrawLine(70, 70, 20, 120, EPD_YELLOW, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
Paint_DrawRectangle(20, 70, 70, 120, EPD_BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
Paint_DrawRectangle(80, 70, 130, 120, EPD_BLACK, DOT_PIXEL_1X1, DRAW_FILL_FULL);
Paint_DrawCircle(45, 95, 20, EPD_BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
Paint_DrawCircle(105, 95, 20, EPD_WHITE, DOT_PIXEL_1X1, DRAW_FILL_FULL);
Paint_DrawLine(85, 95, 125, 95, EPD_YELLOW, DOT_PIXEL_1X1, LINE_STYLE_DOTTED);
Paint_DrawLine(105, 75, 105, 115, EPD_YELLOW, DOT_PIXEL_1X1, LINE_STYLE_DOTTED);
Paint_DrawString_CN(10, 130, "你好 abc", &Font16_UTF8, EPD_BLACK, EPD_WHITE);
Paint_DrawString_CN(10, 170, "微雪电子", &Font16_UTF8, EPD_WHITE, EPD_BLACK);
Paint_DrawNum(10, 10, 123456789, &Font12, EPD_BLACK, EPD_WHITE);
Paint_DrawNum(10, 40, 987654321, &Font12, EPD_WHITE, EPD_BLACK);
Paint_DrawString_EN(145, 0, "Waveshare", &Font16, EPD_BLACK, EPD_WHITE);
Paint_DrawString_EN(145, 35, "Waveshare", &Font16, EPD_GREEN, EPD_WHITE);
Paint_DrawString_EN(145, 70, "Waveshare", &Font16, EPD_BLUE, EPD_WHITE);
Paint_DrawString_EN(145, 105, "Waveshare", &Font16, EPD_RED, EPD_WHITE);
Paint_DrawString_EN(145, 140, "Waveshare", &Font16, EPD_YELLOW, EPD_WHITE);
printf("EPD_Display\r\n");
EPD_Display(Image_Mono);
vTaskDelay(pdMS_TO_TICKS(3000));
#endif
![]() ![]() |
|---|
Demo Description
Hardware Connection
Code Analysis
_sdcard_init: TF card initializationGUI_ReadBmp_RGB_6Color("/sdcard/bmp/13in3E.bmp", 0, 0);: Image decodingOperation Result


Hardware Connection
Demo Description
Xiaozhi-xxx (where xxx is variable).
img directory on the TF card. Only 24‑bit BMP images with resolutions of 1600x1200 or 1200x1600 are accepted.img directory.esp_network with password 1234567890. After successful connection, go to the image selection interface as shown:
esp_network (password: 1234567890), then visit http://192.168.4.1/index.html.http://esp32-s3-photopainter-13_3.local/index.html.img directory on the TF card.config.txt file are shown below:




url, model, and key into the corresponding key‑value fields in the config.txt file located in the sdcard->img directory (see step 1, second image). New users can claim free Tokens.Development Board Design Files
ESP32-S3 Chip Official Manuals
Datasheets
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com