Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
This product a microcontroller development board that adopts ESP32-C6FH8 and supports 2.4GHz Wi-Fi 6 and Bluetooth BLE 5. It integrates 8MB Flash and has onboard 1.47inch capacitive touch LCD screen, can smoothly run GUI programs such as LVGL. Combined with various peripheral interfaces, it is suitable for the quick development of the HMI and other ESP32-C6 applications.
Parameter name | Parameter |
Interface | USB Type-C |
Controller chip | ESP32-C6 |
LCD type | ISP |
Screen resolution | 172 × 320 |
Display chip | JD9853 |
Touch chip | AXS5106L |
ESP32-C6-Touch-LCD-1.47 currently provides two development tools and frameworks, Arduino IDE and ESP-IDF, providing flexible development options, you can choose the right development tool according to your project needs and personal habits.
Arduino IDEArduino IDE is an open source electronic prototyping platform, convenient and flexible, easy to get started. After a simple learning, you can start to develop quickly. At the same time, Arduino has a large global user community, providing an abundance of open source code, project examples and tutorials, as well as rich library resources, encapsulating complex functions, allowing developers to quickly implement various functions. | |
ESP-IDFESP-IDF, or full name Espressif IDE, is a professional development framework introduced by Espressif Technology for the ESP series chips. It is developed using the C language, including a compiler, debugger, and flashing tool, etc., and can be developed via the command lines or through an integrated development environment (such as Visual Studio Code with the Espressif IDF plugin). The plugin offers features such as code navigation, project management, and debugging, etc. |
Each of these two development approaches has its own advantages, and developers can choose according to their needs and skill levels. Arduino are suitable for beginners and non-professionals because they are easy to learn and quick to get started. ESP-IDF is a better choice for developers with a professional background or high performance requirements, as it provides more advanced development tools and greater control capabilities for the development of complex projects.
This chapter introduces setting up the Arduino environment, including the Arduino IDE, management of ESP32 boards, installation of related libraries, program compilation and downloading, as well as testing demos. It aims to help users master the development board and facilitate secondary development.
Board name | Board installation requirement | Version number requirement |
---|---|---|
esp32 by Espressif Systems | "Install Offline" / "Install Online" | ≥3.0.0 |
..\ESP32-C6-Touch-LCD-1.47-Demo\Arduino\libraries
Library Name | Description | Version | Library Installation Requirement |
---|---|---|---|
lvgl | Graphical library | v8.4.0 | "Install Online" (requires copying the demos folder to src) |
GFX_Library_for_Arduino | LCD driver library | v1.5.9 | "Install Online" |
FastIMU | IUM driver library | v1.2.8 | "Install Online" |
esp_lcd_touch_axs5106l | Touch driver library | -- | "Install Offline" |
File
-> New Sketch
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello, World!");
delay(2000);
}
File
-> Save As...
. In the pop-up menu, select the path to save the project, and enter a project name, such as Hello_World, click Save
①. Click to select the dropdown menu option Select Other Board and Port;
②. Search for the required development board model esp32s3 dev module and select;
③. Select COM Port;
④. Save the selection.
①. Compile the program; ②. Compile and download the program; ③. Download successful.
Demo | Basic Description | Dependency Library |
---|---|---|
01_gfx_helloworld | HelloWorld is displayed on the screen | GFX_Library_for_Arduino |
02_qmi8658_output | Serial port prints QMI8658 data | FastIMU |
03_sd_card_test | Test TF card | -- |
04_lvgl_arduino_v8 | lvgl demos | lvgl, GFX_Library_for_Arduino, esp_lcd_touch_axs5106l |
05_lvgl_battery | Use the LVGL library to display the battery voltage | lvgl, GFX_Library_for_Arduino, esp_lcd_touch_axs5106l |
06_lvgl_brightness | Use the LVGL library to control and display screen brightness | lvgl, GFX_Library_for_Arduino, esp_lcd_touch_axs5106l |
07_lvgl_qmi8658 | Use the LVGL library to display QMI8658 data | lvgl, GFX_Library_for_Arduino, FastIMU, esp_lcd_touch_axs5106l |
08_lvgl_image | Use the LVGL library to display images | lvgl, GFX_Library_for_Arduino, esp_lcd_touch_axs5106l |
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 uses the GFX_Library_for_Arduino library to drive the screen and display HelloWorld on the screen
【Hardware connection】
【Code analysis】
Arduino_DataBus *bus = new Arduino_ESP32SPI(45 /* DC */, 21 /* CS */, 38 /* SCK */, 39 /* MOSI */); Arduino_GFX *gfx = new Arduino_ST7789( bus, 47 /* RST */, 0 /* rotation */, false /* IPS */, 172 /* width */, 320 /* height */, 34 /*col_offset1*/, 0 /*uint8_t row_offset1*/, 34 /*col_offset2*/, 0 /*row_offset2*/);
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 acquires QMI8658 data and prints it using serial port
【Hardware connection】
【Code analysis】
int err = IMU.init(calib, IMU_ADDRESS); if (err != 0) { Serial.print("Error initializing IMU: "); Serial.println(err); while (true) { ; } }
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 tests the read and write functions of the TF card
【Hardware connection】
【Code analysis】
#ifdef REASSIGN_PINS SPI.begin(sck, miso, mosi, cs); if (!SD.begin(cs)) { #else if (!SD.begin()) { #endif Serial.println("Card Mount Failed"); return; }
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 runs the lvgl demos
【Hardware connection】
【Precautions】
【Code analysis】
lv_demo_widgets(); // lv_demo_benchmark(); // lv_demo_keypad_encoder(); // lv_demo_music(); // lv_demo_stress();
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 displays battery voltage and ADC values on the screen using the lvgl library
【Hardware connection】
【Code analysis】
lvgl_battery_ui_init(lv_scr_act());
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 displays the screen brightness on the screen using the lvgl library, and controls the screen brightness through the slider
【Hardware connection】
【Code analysis】
lvgl_brightness_ui_init(lv_scr_act());
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 acquires QMI8658 data and displays it using the lvgl library
【Hardware connection】
【Code analysis】
lvgl_qmi8658_ui_init(lv_scr_act());
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 runs the lvgl to display images.
【Hardware connection】
【Preparation】
LV_IMG_DECLARE(image_1);
lv_img_set_src(img, &image_1);
【Result demonstration】
This chapter introduces setting up the ESP-IDF environment setup, including the installation of Visual Studio and the Espressif IDF plugin, program compilation, downloading, and testing of demos, to assist users in mastering the development board and facilitating secondary development.
①Select the corresponding demo
②Its readme will state what chip the demo applies to (how to use the demo and the file structure are described below, omitted here)
③Click to create the demo
①.ESP-IDF Development Environment Version Manager, when our project requires differentiation of development environment versions, it can be managed by installing different versions of ESP-IDF. When the project uses a specific version, it can be switched to by utilizing it
②.Device flashing COM port, select to flash the compiled program into the chip
③.Select set-target chip model, select the corresponding chip model, for example, ESP32-P4-NANO needs to choose esp32p4 as the target chip
④.menuconfig, click it to Modify sdkconfig configuration file Project configuration details
⑤.fullclean button, when the project compilation error or other operations pollute the compiled content, you can clean up all the compiled content by clicking it
⑥.Build project, when a project satisfies the build, click this button to compile
⑦.Current download mode, the default is UART
⑧.flash button, when a project build is completed, select the COM port of the corresponding development board, and click this button to flash the compiled firmware to the chip
⑨.monitor enable flashing port monitoring, when a project passes through Build --> Flash, click this button to view the log of output from flashing port and debugging port, so as to observe whether the application works normally
⑩.Debug
⑪.Build Flash Monitor one-click button, which is used to continuously execute Build --> Flash --> Monitor, often referred to as "little flame"
CMakeLists.txt
.CMake
first reads the content of the top-level CMakeLists.txt
in the project directory to read the build rules and identify the content to be compiled. When the required components and demos are imported into the CMakeLists.txt
, the compilation tool CMake
will import each content that needs to be compiled according to the index. The compilation process is as follows:Demo | Basic Description |
---|---|
01_factory | Comprehensive test demo |
02_sd_card_test | Test the read and write of the TF card |
03_lvgl_example | Display lvgl demos |
04_lvgl_image | Use lvgl library to display images |
【Demo description】
This demo tests the functionality of the ESP32-C6-Touch-LCD-1.47 onboard modules, the information of each module will be displayed on the screen, and the user can swipe left and right through the touch screen to switch between pages
【Hardware connection】
【Code analysis】
i2c_bus_handle = bsp_i2c_init(); bsp_battery_init(); bsp_wifi_init("WSTEST", "waveshare0755"); bsp_display_init(&io_handle, &panel_handle, EXAMPLE_LCD_H_RES * EXAMPLE_LCD_DRAW_BUFF_HEIGHT); bsp_touch_init(&touch_handle, i2c_bus_handle, EXAMPLE_LCD_H_RES, EXAMPLE_LCD_V_RES, EXAMPLE_DISPLAY_ROTATION); bsp_sdcard_init(); ESP_ERROR_CHECK(app_lvgl_init()); lv_fs_fatfs_init(); bsp_display_brightness_init(); bsp_display_set_brightness(100);
if (lvgl_port_lock(0)) { lvgl_ui_init(); lvgl_port_unlock(); }
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 tests the read and write functions of the TF card
【Hardware connection】
【Code analysis】
spi_bus_config_t bus_cfg = { .mosi_io_num = PIN_NUM_MOSI, .miso_io_num = PIN_NUM_MISO, .sclk_io_num = PIN_NUM_CLK, .quadwp_io_num = -1, .quadhd_io_num = -1, .max_transfer_sz = 4000, }; ret = spi_bus_initialize(host.slot, &bus_cfg, SDSPI_DEFAULT_DMA); if (ret != ESP_OK) { ESP_LOGE(TAG, "Failed to initialize bus."); return; }
sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT(); slot_config.gpio_cs = PIN_NUM_CS; slot_config.host_id = host.slot; ESP_LOGI(TAG, "Mounting filesystem"); ret = esp_vfs_fat_sdspi_mount(mount_point, &host, &slot_config, &mount_config, &card);
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 runs the lvgl demos
【Hardware connection】
【Code analysis】
// lv_demo_benchmark(); // lv_demo_music(); lv_demo_widgets(); lvgl_port_unlock();
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-Touch-LCD-1.47 runs the lvgl to display images.
【Hardware connection】
【Preparation】
idf_component_register(SRCS "main.c" "image_1.c" INCLUDE_DIRS ".")
LV_IMG_DECLARE(image_1);
lv_img_set_src(img, &image_1);
【Result demonstration】
..\ESP32-C6-Touch-LCD-1.47-Demo\Firmware
①View through Device Manager: Press the Windows + R keys to open the "Run" dialog box; input devmgmt.msc and press Enter to open the Device Manager; expand the "Ports (COM and LPT)" section, where all COM ports and their current statuses will be listed.
②Use the command prompt to view: Open the Command Prompt (CMD), enter the "mode" command, which will display status information for all COM ports.
③Check hardware connections: If you have already connected external devices to the COM port, the device usually occupies a port number, which can be determined by checking the connected hardware.
①Use the dmesg command to view: Open the terminal.
①Use the ls command to view: Enter ls /dev/ttyS* or ls /dev/ttyUSB* to list all serial port devices.
③Use the setserial command to view: Enter setserial -g /dev/ttyS* to view the configuration information of all serial port devices.
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com