You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+60-49Lines changed: 60 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,30 @@
1
-
# esp-display-panel
1
+
[](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml)[](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml)[](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/build_test.yml)
2
2
3
-
esp-display-panel is a versatile Arduino library designed to drive display panels with ESP32. It is primarily developed for various [Espressif development boards](#espressif-development-boards), and can also be used for custom boards.
3
+
# ESP32_Display_Panel
4
4
5
-
esp-display-panel is based on [arduino-esp32](https://github.com/espressif/arduino-esp32) and [Espressif Components Registry](https://components.espressif.com/), with various components encapsulated using C++.
5
+
*[中文版](./README_CN.md)
6
+
7
+
ESP32_Display_Panel is an Arduino library designed for driving display screens using ESP32 SoCs. It can be used not only for developing various [Espressif development boards](#espressif-development-boards) but also for custom board development.
8
+
9
+
ESP32_Display_Panel encapsulates various components from the [Espressif Components Registry](https://components.espressif.com/). It is developed based on [arduino-esp32](https://github.com/espressif/arduino-esp32) and can be easily downloaded and integrated into the Arduino IDE.
6
10
7
11
## Overview
8
12
9
-
The block diagram of esp-display-panel is shown in the figure below, mainly comprising the following features:
13
+
The block diagram of ESP32_Display_Panel is shown in the figure below, it primarily includes the following features:
10
14
11
15
* Supports various Espressif development boards.
12
-
* Supports custom boards.
16
+
* Supports custom board.
13
17
* Supports multiple types of drivers, including Bus, LCD, Touch, Backlight.
@@ -66,11 +75,11 @@ The block diagram of esp-display-panel is shown in the figure below, mainly comp
66
75
67
76
## How to Use
68
77
69
-
To use a library in Arduino IDE, please refer to the [docs](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries)for IDE v1.x.x or the [docs](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library) for IDE v2.x.x.
78
+
For information on how to use the library in the Arduino IDE, please refer to the documentation for [Arduino IDE v1.x.x](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries)or [Arduino IDE v2.x.x](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library).
70
79
71
80
### Examples
72
81
73
-
Here are some examples of using esp-display-panel. To access them in the Arduino IDE, navigate to `File -> Examples -> esp-display-panel`. **Each example sketch and README offer comprehensive usage instructions. Please review them before compiling.**
82
+
Here are some examples of using ESP32_Display_Panel. To access them in the Arduino IDE, navigate to `File -> Examples -> ESP32_Display_Panel`. **Each example sketch and README offer comprehensive usage instructions. Please review them before compiling.**
74
83
75
84
* Panel:
76
85
*[Draw Color Bar](examples/Panel/DrawColorBar/): This example demonstrates how to draw simple color bar.
@@ -80,64 +89,65 @@ Here are some examples of using esp-display-panel. To access them in the Arduino
80
89
81
90
### Detailed Usage
82
91
83
-
Here are the details of how to use esp-display-panel.
92
+
The following provides a comprehensive guide on how to use ESP32_Display_Panel.
84
93
85
-
### Configure esp-display-panel
94
+
### Configure ESP32_Display_Panel
86
95
87
-
esp-display-panel has its own configuration file called `ESP_Panel_Conf.h`. When esp-display-panel is installed, follow these configuration steps:
96
+
ESP32_Display_Panel has its own configuration file called `ESP_Panel_Conf.h`. After installing ESP32_Display_Panel, follow these configuration steps:
88
97
89
-
1. Go to the directory of the installed Arduino libraries.
90
-
2. Go to the `esp-display-panel` folder, copy `ESP_Panel_Conf_Template.h` and place it out of `esp-display-panel` folder. It should be at the same level as the `esp-display-panel` folder. Then rename it as `ESP_Panel_Conf.h`.
91
-
92
-
Finally, the layout of the Arduino Libraries folder with `ESP_Panel_Conf.h` should look like this:
98
+
1. Navigate to the directory where Arduino libraries are installed.
99
+
2. Navigate to the `ESP32_Display_Panel` folder, copy `ESP_Panel_Conf_Template.h` and place the copy outside the `ESP32_Display_Panel` folder at the same directory level. Then rename the copied file as `ESP_Panel_Conf.h`.
100
+
3. Finally, the layout of the Arduino Libraries folder with `ESP_Panel_Conf.h` appear as follows:
93
101
94
102
```
95
103
Arduino
96
104
|-libraries
97
-
|-esp-display-panel
105
+
|-ESP32_Display_Panel
98
106
|-other_lib_1
99
107
|-other_lib_2
100
108
|-ESP_Panel_Conf.h
101
109
```
102
110
103
-
### Configure Supported Board
111
+
4. Please refer to the [Supported Boards List](#supported-boards--drivers) to check if the current board is compatible. If it is compatible, please navigate to the "[For Supported Boards](#for-supported-board)" section; Otherwise, navigate to the "[For Unsupported Boards](#for-unsupported-board)" section.
104
112
105
-
Please refer to the list of [Supported Boards](#supported-boards--drivers) to verify whether the current board is compatible.
113
+
#### For Supported Board
106
114
107
-
Open `ESP_Panel_Conf.h` and uncomment one of the following macros to select an supported development board. Taking `ESP32_S3_BOX` as an example:
115
+
1. Open `ESP_Panel_Conf.h` file. First, set the macro `ESP_PANEL_USE_SUPPORTED_BOARD` to `1` (default is `1`). Then, according to the name of your target development board, uncomment the macro definitions in the format `ESP_PANEL_BOARD_<NAME>` below,
116
+
2. The following code takes *ESP32_S3_BOX* development board as an example:
108
117
109
118
```c
119
+
...
110
120
// #define ESP_PANEL_BOARD_ESP32_C3_LCDKIT
111
121
#defineESP_PANEL_BOARD_ESP32_S3_BOX
112
122
// #define ESP_PANEL_BOARD_ESP32_S3_BOX_LITE
123
+
...
113
124
```
114
125
115
-
After that, refer to [Use Library](#use-library) to use the library in the sketch.
126
+
3. After that, navigate to the "[Use APIs](#use-apis)" section to use the library in the sketch.
116
127
117
-
###Configure Unsupported Board
128
+
#### For Unsupported Board
118
129
119
-
Since esp-display-panel library can only utilize the internally supported drivers, please ensure that the LCD, Touch, and required Bus for the custom board are present in the list of [Supported Drivers](#supported-boards--drivers).
130
+
Since ESP32_Display_Panel library can only utilize the internally supported drivers, please ensure that the **LCD**, **Touch**, and **Bus**for the custom board are present in the list of [Supported Drivers](#supported-boards--drivers).
120
131
121
-
Open `ESP_Panel_Conf.h`. Firstly, set the macro `ESP_PANEL_USE_SUPPORTED_BOARD` to `0`, as below:
132
+
1. Open `ESP_Panel_Conf.h` and set the macro `ESP_PANEL_USE_SUPPORTED_BOARD` to `0`, as shown below:
122
133
123
134
```c
124
135
#defineESP_PANEL_USE_SUPPORTED_BOARD (0)
125
136
```
126
137
127
-
After that, modify the values of other macros as needed. They represent parameters that can be adjusted for LCD, Touch, and other devices initialization.
138
+
2. Modify the values of other macros as needed. They represent parameters that can be adjusted for LCD, Touch, and other devices initialization.
128
139
129
-
Here are some important macros for the **LCD**:
140
+
* Here are some important macros for the **LCD**:
130
141
131
142
```c
132
143
/* Set to 0 if not using LCD */
133
144
#define ESP_PANEL_USE_LCD (0)
134
145
135
146
/**
136
-
* LCD IC name. Choose one of the following:
137
-
* - ST7262
138
-
* - ST7789
139
-
* - GC9503
140
-
* - GC9A01
147
+
* LCD controller name. Choose one of the following:
148
+
* - ILI9341
149
+
* - GC9503, GC9A01
150
+
* - ST7262, ST7789, ST7796
141
151
*/
142
152
#define ESP_PANEL_LCD_NAME ST7789
143
153
@@ -189,7 +199,7 @@ Here are some important macros for the **LCD**:
189
199
#define ESP_PANEL_LCD_RST_LEVEL (0)
190
200
```
191
201
192
-
Here are some important macros for the **LCD Touch**:
202
+
* Here are some important macros for the **LCD Touch**:
193
203
194
204
```c
195
205
/* Set to 0 if not using LCD touch */
@@ -199,8 +209,7 @@ Here are some important macros for the **LCD Touch**:
199
209
* LCD Touch IC name. Choose one of the following:
200
210
* - CST816S
201
211
* - FT5x06
202
-
* - GT1151
203
-
* - GT911
212
+
* - GT1151, GT911
204
213
* - TT21100
205
214
* - STMPE610
206
215
*/
@@ -242,7 +251,7 @@ Here are some important macros for the **LCD Touch**:
242
251
#defineESP_PANEL_LCD_TOUCH_INT_LEVEL (0)
243
252
```
244
253
245
-
Here are some important macros for the **backlight**:
254
+
*Here are some important macros for the **backlight**:
246
255
247
256
```c
248
257
#defineESP_PANEL_USE_BL (0)
@@ -265,9 +274,11 @@ Here are some important macros for the **backlight**:
265
274
...
266
275
```
267
276
268
-
### Use Library
277
+
3. After configuring the `ESP_Panel_Conf.h` file, please navigate to the "[Use APIs](#use-apis)" section to check the functions provided by ESP32_Display_Panel.
278
+
279
+
### Use APIs
269
280
270
-
Use the library in the sketch, and the following codes show the usage of common APIs:
281
+
The following codes show the usage of common APIs:
0 commit comments