Google Chat:---
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
WhatsApp:13424403025
The ESP32-C5-LCD-1.47 is a microcontroller development board that supports 2.4 GHz / 5 GHz Wi-Fi 6, Bluetooth 5 (LE), and IEEE 802.15.4. It features an onboard 1.47inch LCD, TF card slot, RGB LED, and common peripheral interfaces, making it suitable for ESP32-C5 HMI, wireless communication, and embedded display applications.
| SKU | Product |
|---|---|
| 34961 | ESP32-C5-LCD-1.47 |
| 34960 | ESP32-C5-LCD-1.47-M |


LCD
| LCD Pin | ESP32-C5 |
|---|---|
| LCD_CLK | GPIO7 |
| LCD_DIN | GPIO6 |
| LCD_CS | GPIO23 |
| LCD_DC | GPIO24 |
| LCD_RST | GPIO26 |
| LCD_BL | GPIO10 |
RGB LED
| RGB LED | ESP32-C5 |
|---|---|
| WS2812 | GPIO8 |
TF Card
| TF Card | ESP32-C5 |
|---|---|
| MISO | GPIO5 |
| MOSI | GPIO6 |
| CLK | GPIO7 |
| CS | GPIO4 |
UART0
| UART0 | ESP32-C5 |
|---|---|
| TX | GPIO11 |
| RX | GPIO12 |
USB
| USB | ESP32-C5 |
|---|---|
| D+ | GPIO14 |
| D- | GPIO13 |

| Parameter | Value |
|---|---|
| Interface | USB Type-C |
| Main Chip | ESP32-C5FH4 |
| Flash | 4 MB |
| Screen Type | TFT |
| Screen Size | 1.47 inches |
| Screen Resolution | 172 × 320 |
| Screen Interface | SPI |
| Screen Controller | ST7789 |
| Touch | None |
| Onboard Devices | TF, WS2812 RGB LED |
| Broken-out Interface | 18PIN header |
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 the Arduino IDE to download and install the Arduino IDE.
The example programs require the following Arduino libraries. If you are installing libraries manually in Arduino IDE, refer to the Arduino Library Manager Tutorial.
| Library Name | Description |
|---|---|
| GFX Library for Arduino | LCD graphics driver library, used as GFX_Library_for_Arduino in the examples |
| lvgl 9.5.0 | Graphics library, used for LVGL-related examples |
LVGL has version dependencies with the example code. Please use lvgl 9.5.0 to avoid compilation failures or display issues caused by version mismatches.
The example programs are located in the examples/arduino directory of the resource package. Before flashing, ensure that the board model, USB port, and partition scheme are correctly configured.
The root directory of the resource package already contains the libraries folder. Before compiling examples in Arduino IDE, open "File" > "Preferences" and set the "Sketchbook location" to the root directory of the resource package, i.e., the esp32-c5-lcd-1.47 folder that contains both libraries and examples. After setting, restart Arduino IDE, then open the examples to compile and flash.
| Feature | Resource | GPIO or Notes |
|---|---|---|
| LCD | ST7789, SPI, 172 × 320, RGB565 | SCLK GPIO7, MOSI GPIO6, CS GPIO23, DC GPIO24, RST GPIO26 |
| LCD Backlight | LEDC PWM | GPIO10 |
| TF | SDSPI | SCLK GPIO7, MOSI GPIO6, MISO GPIO5, CS GPIO4 |
| RGB LED | WS2812B, 1 LED | GPIO8, RGB order |
| SPIFFS | Internal Flash file system | Select a partition scheme that includes SPIFFS |
| Wi-Fi | ESP32-C5 built-in wireless | No extra GPIO needed |
06_spiffs_rw and 08_board_showcase, select a partition scheme that includes SPIFFS.When using arduino-cli to compile, refer to the following commands:
arduino-cli lib install "GFX Library for Arduino"
arduino-cli lib install "lvgl@9.5.0"
arduino-cli compile --fqbn esp32:esp32:esp32c5 arduino/02_lvgl_hello
| Example Directory | Description |
|---|---|
01_lcd_panel_basic | Initialize the LCD using GFX_Library_for_Arduino and draw color blocks |
02_lvgl_hello | Start LVGL 9.5.0 and display a basic interface on the LCD |
03_backlight_fade | Use LEDC to adjust the LCD backlight and display the brightness value via LVGL |
04_ws2812_rgb | Use rgbLedWrite() to control the onboard WS2812B RGB LED to cycle through different colors |
05_sdcard_rw | Show a TF status page and perform file write and read-back verification |
06_spiffs_rw | Mount SPIFFS and perform file write and read-back verification in internal Flash |
07_wifi_scan | Scan nearby Wi-Fi networks and output the scan results with strong signals via serial |
08_board_showcase | Comprehensive demonstration of LCD, WS2812B, SPIFFS, TF card, and Wi-Fi status |
GFX_Library_for_Arduino without starting LVGL.setup(): Initializes serial, LCD backlight, and LCD driver, then calls draw_color_bars() to draw the background.init_backlight(): Configures LEDC PWM backlight output on GPIO10.draw_color_bars(): Draws multiple color stripes across the screen width.loop(): Periodically calls draw_motion_frame() to refresh the area where the moving color block is located.
GFX_Library_for_Arduino.setup(): Resets the LCD, then initializes the display driver, LVGL, and the example UI.reset_lcd_panel(): Controls CS, DC, and RST pins according to the LCD reset timing.init_display(): Initializes the ST7789 and sets screen orientation and backlight.init_lvgl(): Creates the LVGL display object, configures the refresh callback and display buffer.create_ui(): Creates UI elements such as title, device info, and status bar.loop(): Calls lvgl_loop_once() to handle LVGL periodic tasks.
setup(): Initializes the LCD, LVGL, and the backlight example UI.init_display(): Starts the LCD and sets the initial backlight.init_lvgl(): Configures the LVGL display buffer and refresh callback.create_ui(): Creates a brightness value label and a progress bar.loop(): Periodically calls set_backlight() and update_ui() to vary the backlight brightness as a percentage.lvgl_loop_once(): Advances the LVGL tick and handles UI refresh.
rgbLedWrite() from the ESP32 Arduino core to control the onboard WS2812B RGB LED.setup(): Initializes serial and prints the example name.set_led(): Wraps the RGB LED color setting. For the onboard LED, the parameter order is red, green, blue.loop(): Calls set_led() at fixed intervals to cycle the RGB LED through different colors.setup(): Initializes the LCD, LVGL, TF card pins, and status UI, then performs the TF card read/write test.init_sd_pins(): Configures the TF card related pin states.mount_sd_card(): Mounts the TF card via SDSPI and reads card type and capacity.write_file(): Writes a test file to the TF card.read_file(): Reads back the test file content and verifies data consistency.set_item() and set_summary(): Update the step status and final result on the LCD.loop(): Calls lvgl_loop_once() to keep the UI refreshed.
/hello.txt, reads it back, and outputs the content via serial.setup(): Initializes serial, mounts SPIFFS with SPIFFS.begin(true), and prints total and used capacity.write_read_check(): Deletes the old test file, writes new content, reads it back, and checks if the string matches.loop(): This example has no loop task.
setup(): Initializes serial, sets Wi-Fi to STA mode, and disconnects any existing connection.loop(): Calls WiFi.scanNetworks() to scan, then outputs the number of networks, SSID, RSSI, and channel for each.WiFi.scanDelete(): Frees the resources used by the scan results.
RUN, PASS, WARN or FAIL.setup(): Initializes the LCD, LVGL, status UI, and the comprehensive test flow.create_ui(): Creates the board resource status panel.run_showcase(): Sequentially checks the LCD, RGB LED, SPIFFS, TF card, and Wi-Fi.file_rw_check(): Performs file write and read-back verification on SPIFFS or the TF card.mount_sd_card(): Mounts the TF card and reads capacity information.set_item(): Updates the status and description text for each feature.loop(): Calls lvgl_loop_once() to keep the UI refreshed.
05_sdcard_rw, insert a FAT or FAT32-formatted TF card.06_spiffs_rw and 08_board_showcase require a partition scheme that includes SPIFFS.red, green, blue.When using the device, keep the screen brightness below 50% and avoid running it at full brightness for extended periods. Excessive brightness will raise the screen temperature and may cause dark shadows to appear on the display.
If display issues occur, power off the board and let it rest for a while before flashing a program with lower brightness settings.
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.
Please refer to Install ESP-IDF Development Environment.
The ESP32-C5-LCD-1.47 examples require ESP-IDF v5.3.0 or newer.
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.
The screenshots in this section use ESP-IDF V5.5.2 as an example. When installing, please select the ESP-IDF version that matches your board's example.
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 the ESP-IDF version you need (the version shown in the screenshot is for reference only — choose the version that fits your actual needs).

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 example programs are located in the examples/esp-idf directory of the resource package. Each example's sdkconfig.defaults already specifies the target chip as esp32c5, so you generally do not need to run idf.py set-target esp32c5 again.
Navigate to any ESP-IDF example directory and run:
cd esp-idf/02_lvgl_hello
idf.py build flash monitor
If you need to specify a serial port, replace COMx with the actual port, for example COM5:
idf.py -p COMx build flash monitor
| Example Directory | Description |
|---|---|
01_lcd_panel_basic | Initialize the LCD without LVGL, draw color bars and a moving color block |
02_lvgl_hello | Start the BSP LVGL display interface and show a basic UI |
03_backlight_fade | Adjust the LCD backlight brightness and display the brightness changes on screen |
04_ws2812_rgb | Control the onboard WS2812B RGB LED to cycle through different colors |
05_sdcard_rw | Mount a TF card and perform file write and read-back verification |
06_spiffs_rw | Mount the SPIFFS partition in internal Flash and perform file write and read-back verification |
07_wifi_scan | Scan nearby Wi-Fi networks and output the scan results via serial |
08_board_showcase | Comprehensive demonstration of LCD, backlight, RGB LED, SPIFFS, TF card, and Wi-Fi status |
app_main(): Creates the LCD panel, initializes backlight, registers the transfer-complete callback, and starts the display flow.bsp_display_new(): Creates the LCD panel and panel IO objects.bsp_display_brightness_init() and bsp_display_brightness_set(): Initialize and set the LCD backlight.draw_color_bars(): Draws a multi-color stripe background in blocks.esp_lcd_panel_draw_bitmap(): Writes image data to the specified LCD region.draw_moving_bar_region(): Refreshes the moving color block and the background area it covers.
app_main(): Starts the BSP display service, sets screen orientation and backlight, and creates the LVGL UI.bsp_display_start(): Starts the LCD panel and LVGL port.bsp_display_rotate(): Sets the screen rotation.bsp_display_backlight_on(): Turns on the LCD backlight.bsp_display_lock() and bsp_display_unlock(): Protect the LVGL UI creation process.create_ui(): Creates the title, description text, device info, and status bar.
bsp_display_brightness_set() to adjust the LCD backlight brightness.app_main(): Starts the BSP display service, creates the brightness UI, and enters the brightness loop.create_ui(): Creates the brightness title, percentage label, and progress bar.bsp_display_brightness_set(): Sets the LCD backlight according to the current percentage.update_ui(): Updates the LVGL label and progress bar values.bsp_display_lock() and bsp_display_unlock(): Protect the LVGL widget update process.
app_main(): Initializes the RGB LED and enters the color loop.bsp_ws2812b_init(): Initializes the onboard WS2812B LED.bsp_setledcolor(): Sets the red, green, and blue brightness for the specified LED.vTaskDelay(): Controls the color switching interval.app_main(): Starts the LCD and LVGL UI, mounts the TF card, and performs the read/write test.bsp_sdcard_mount(): Mounts the TF card.sd_write_file(): Writes a test file to the TF card.sd_read_file(): Reads back the test file content and verifies data consistency.set_item() and set_summary(): Update the step status and final result on the LCD.bsp_sdcard_unmount(): Unmounts the TF card after the test completes.
storage.app_main(): Mounts SPIFFS, writes a test file, reads it back, and outputs the verification result.bsp_spiffs_mount(): Mounts the storage SPIFFS partition.fopen(), fwrite() and fread(): Perform file write and read-back operations.bsp_spiffs_unmount(): Unmounts SPIFFS after the test completes.
app_main(): Initializes NVS and Wi-Fi STA mode, and creates a scan task.init_nvs(): Initializes NVS for use by the Wi-Fi component.init_wifi_sta(): Initializes Wi-Fi and sets it to STA mode.wifi_scan_task(): Periodically performs Wi-Fi scans and outputs the results.ssid_to_printable_ascii(): Filters non-printable characters for proper SSID display over serial.
RUN, PASS, WARN or FAIL.app_main(): Starts the BSP display service, sets screen orientation and backlight, and creates the comprehensive test task.create_ui(): Creates the board resource status panel.showcase_task(): Sequentially checks the LCD, RGB LED, SPIFFS, TF card, and Wi-Fi.write_read_file(): Performs file write and read-back verification on SPIFFS or the TF card.wifi_scan_once(): Performs a single Wi-Fi scan and generates a status text.set_item(): Updates the status and description text for each feature.bsp_setledcolor(): Sets the RGB LED color according to the final status.
08_board_showcase displays the test result for each feature on the LCD, and uses the RGB LED to indicate the overall status.
| LED State | Meaning |
|---|---|
| Green | All items are PASS. |
| Yellow | There is a WARN, such as no TF card inserted or no Wi-Fi networks found. |
| Red | There is a FAIL, indicating a feature test has failed. |
Instructions:
CHECK or No card, and the final LED state is yellow.05_sdcard_rw, insert a FAT or FAT32-formatted TF card.06_spiffs_rw and 08_board_showcase use a custom partition table that includes the storage SPIFFS partition.red, green, blue.ESP32-C5 Chip Official Manuals
LCD Manuals
WS2812 Manuals
Example
Debugging Tools
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com