Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
ESP32-C6-LCD-1.69 is a low-cost, high-performance MCU board designed by Waveshare. It is equipped with a 1.69inch LCD screen, a lithium battery charging chip, an audio codec chip, a six-axis sensor (three-axis accelerometer and three-axis gyroscope), RTC and other peripherals, which are convenient for development and embedding into the product.
1. ESP32-C6 2. W25Q128JVSIQ 3. PCF85063 4. QMI8658 5. ETA6098 6. MX1.25 Lithium battery interface 7. Type-C port 8. MX1.25 Speaker interface 9. Onboard SMD antenna 10. PWR button 11. BOOT button 12. RST button 13. Microphone 14. NS4150B 15. ESP32-S3-WROOM-1-N16R8 |
ESP32-C6-LCD-1.69 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.2.0 |
Library Name | Description | Version | Library Installation Requirement |
---|---|---|---|
lvgl | LVGL graphical library | v8.4.0 or v9.2.2 | "Install Online" |
GFX_Library_for_Arduino | GFX graphical library | v1.6.0 | "Install Online" |
U8g2 | Graphical library | v2.35.30 | "Install Online" |
SensorLib | Sensor library | v0.3.1 | "Install Online" |
OneButton | Button library | v2.6.1 | "Install Online" |
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_audio_out | Play PCM audio data through I2S interface | --- |
02_button_example | Display battery voltage on the screen | OneButton |
03_battery_example | BOOT button click, double click, long press, etc. | OneButton |
04_es8311_example | Play the sound collected by the microphone in real time through the speaker | --- |
05_gfx_helloworld | Display HelloWorld on the screen | GFX_Library_for_Arduino |
06_gfx_pdq_graphicstest | Perform graphical tests and display the score | GFX_Library_for_Arduino |
07_gfx_clock | Display an analog clock dial on the screen | GFX_Library_for_Arduino |
08_gfx_u8g2_font | Display text in various languages by loading font libraries | GFX_Library_for_Arduino, U8g2 |
09_gfx_image | Display pictures on the screen | GFX_Library_for_Arduino |
10_esp_wifi_analyzer | Display WiFi band signal strength on the screen | GFX_Library_for_Arduino |
11_pcf85063_example | Display RTC time on the screen | GFX_Library_for_Arduino, SensorLib |
12_qmi8658_example | Display IMU data on the screen | GFX_Library_for_Arduino, SensorLib |
13_lvgl_arduino_v8 | LVGL v8 version demo | lvgl (v8.4.0), GFX_Library_for_Arduino, SensorLib |
14_lvgl_arduino_v9 | lvgl v9 version demo | lvgl (v9.3.0), GFX_Library_for_Arduino, SensorLib |
【Demo description】
This demo demonstrates that the ESP32-C6-LCD-1.69 plays PCM audio data.
【Code analysis】
i2s.write((uint8_t *)audio_data, AUDIO_SAMPLES * 2);
【Result demonstration】
【Demo description】
This demo demonstrates how to use the OneButton library to read the click, double-click, and long press states of the BOOT and PWM buttons, and print the states through the serial port.
【Code analysis】
button1.attachClick(click1); button1.attachDoubleClick(doubleclick1); button1.attachLongPressStart(longPressStart1); button1.attachLongPressStop(longPressStop1); button1.attachDuringLongPress(longPress1);
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-LCD-1.69 displays the battery voltage in real time on the screen.
【Result demonstration】
【Demo description】
This demo demonstrates using the ESP32-C6-LCD-1.69 to drive the ES8311 audio codec to achieve real-time playback of microphone-collected sound through the speaker.
【Code analysis】
void es8311_test_task(void *arg) { const int limit_size_max = 1600; uint8_t data[limit_size_max]; while (1) { if (xSemaphoreTake(es8311_recording_BinarySemaphore, portMAX_DELAY) == pdTRUE) { while (1) { i2s.readBytes((char *)data, limit_size_max); i2s.write(data, limit_size_max); if (xSemaphoreTake(es8311_stop_BinarySemaphore, 0) == pdTRUE) break; } } } }
【Result demonstration】
【Demo description】
This demo demonstrates the ESP32-C6-LCD-1.69 using the GFX_Library_for_Arduino library to drive the screen and display HelloWorld on the screen.
【Code analysis】
Arduino_DataBus *bus = new Arduino_HWSPI(LCD_DC, LCD_CS, LCD_SCK, LCD_DIN); Arduino_GFX *gfx = new Arduino_ST7789( bus, LCD_RST, 0 /* rotation */, true /* IPS */, 240 /* width */, 280 /* height */, 0 /* col offset 1 */, 20 /* row offset 1 */, 0 /* col offset 2 */, 20 /* row offset 2 */);
【Result demonstration】
【Demo description】
This demo demonstrates that the ESP32-C6-LCD-1.69 uses the GFX_Library_for_Arduino library to drive the screen for the graphical test and displays the score
【Result demonstration】
【Demo description】
This demo demonstrates that the ESP32-C6-LCD-1.69 uses the GFX_Library_for_Arduino library to display an analog clock dial
【Result demonstration】
【Demo description】
This demo demonstrates how ESP32-C6-LCD-1.69 uses GFX_Library_for_Arduino libraries to load font libraries to display them in various languages
【Result demonstration】
【Demo description】
This demo demonstrates how the ESP32-C6-LCD-1.69 uses the GFX_Library_for_Arduino library to display pictures on the screen.
【Hardware connection】
【Preparation】
gfx->draw16bitBeRGBBitmap(0, 0, (uint16_t *)gImage_img, 240, 280);
【Result demonstration】
【Demo description】
This demo demonstrates the ESP32-C6-LCD-1.69 using a GFX_Library_for_Arduino library to display the signal strength of the WiFi band
【Result demonstration】
【Demo description】
This demo demonstrates that the ESP32-C6-LCD-1.69 obtains the time and date of the PCF85063 and displays it on the screen.
【Result demonstration】
【Demo description】
This demo demonstrates that the ESP32-C6-LCD-1.69 acquires the Accel, Gyro, and temperature of the qmi8658 and displays them on the screen.
【Result demonstration】
【Demo description】
This demo shows that ESP32-C6-LCD-1.69 runs lvgl v8 version demo.
【Result demonstration】
【Demo description】
This demo shows that ESP32-C6-LCD-1.69 runs lvgl v8 version demo.
【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 demo |
02_lvgl_example_v8 | lvgl v8 demos |
03_lvgl_example_v9 | lvgl v9 demos |
04_qmi8658_example | Print IMU data through serial port |
05_pcf85063_example | Print RTC data through serial port |
06_lvgl_image_v8 | Display images using lvgl v8 version |
07_lvgl_image_v9 | Display images using lvgl v9 version |
【Demo description】
This is a comprehensive demo of ESP32-C6-LCD-1.69, which is also the default demo flashed at factory.
【Result demonstration】
【Demo description】
This demo shows that ESP32-C6-LCD-1.69 runs lvgl v8 version demo.
【Result demonstration】
【Demo description】
This demo shows that ESP32-C6-LCD-1.69 runs lvgl v8 version demo.
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-LCD-1.69 drives QMI8658, obtains and prints Accel, Gyro, and Angle.
【Code analysis】
i2c_master_bus_handle_t i2c_bus_handle; bsp_pwr_init(); i2c_bus_handle = bsp_i2c_init(); //I2C initialization bsp_qmi8658_init(i2c_bus_handle); // QMI8658 initialization bsp_qmi8658_test(); // QMI8658 test
【Result demonstration】
【Demo description】
This demo demonstrates that ESP32-C6-LCD-1.69 drives PCF85063, sets the time, date, and obtains the time.
【Code analysis】
i2c_master_bus_handle_t i2c_bus_handle; bsp_pwr_init(); i2c_bus_handle = bsp_i2c_init(); //I2C initialization bsp_pcf85063_init(i2c_bus_handle); // QMI8658 initialization bsp_pcf85063_test(); // QMI8658 test
【Result demonstration】
【Demo description】
This demo shows that ESP32-C6-LCD-1.69 runs lvgl v8 version and displays pictures.
【Hardware connection】
【Preparation】
idf_component_register(SRCS "main.cpp" "image_1.c" INCLUDE_DIRS ".")
LV_IMG_DECLARE(image_1);
lv_img_set_src(img, &image_1);
【Result demonstration】
【Demo description】
This demo shows that ESP32-C6-LCD-1.69 runs lvgl v8 version and displays pictures.
【Hardware connection】
【Preparation】
idf_component_register(SRCS "main.cpp" "image_1.c" INCLUDE_DIRS ".")
LV_IMAGE_DECLARE(image_1);
lv_image_set_src(img, &image_1);
【Result demonstration】
..\ESP32-C6-LCD-1.69-Demo\Firmware
1. When the serial port is occupied, the flashing will fail. Close the serial port monitor and try to flash again
2. When the ESP32 program crashes, the flashing will fail, and the development module needs to be completely powered off, hold down BOOT and power it on again to enter the strong download mode and then flash it. It will not automatically exit the download mode after flashing, so you need to power off and restart again
Windows system:
①View through Device Manager: Press the Windows + R keys to open the "Run" dialog box; Input devmgmt.msc and press Enter to open Device Manager; Expand the "Port (COM and LPT)" section, here it will list all the COM ports and their current status.
②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.
Linux system:
①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