Update README

This commit is contained in:
lewishe 2024-01-31 18:12:24 +08:00
parent 3a3e0bb922
commit 7cf26a44e2

200
README.md
View File

@ -2,83 +2,165 @@
[![PlatformIO CI](https://github.com/Xinyuan-LilyGO/T-Display-S3/actions/workflows/platformio.yml/badge.svg)](https://github.com/Xinyuan-LilyGO/T-Display-S3/actions/workflows/platformio.yml)
## Description
## 1⃣Support Product
T-Display-S3 is a ESP32-S3 development board. It is equipped with a color 1.9" LCD screen and two programmable buttons. Communication using I8080 interface. Retains the same layout design as T-Display. You can directly use ESP32S3 for USB communication or programming.
| Product (PinMap) | SOC | Flash | PSRAM | Resolution | Size |
| ----------------------- | ---------- | ----- | -------- | ---------- | -------- |
| [T-Display-S3][1] | ESP32-S3R8 | 16MB | 8MB(OPI) | 170x320 | 1.9 Inch |
| [T-Display-S3-Touch][2] | ESP32-S3R8 | 16MB | 8MB(OPI) | 170x320 | 1.9 Inch |
| [T-Display-S3-MIDI][3] | | | | | |
## T-Display-S3 Pinout
[1]: https://www.lilygo.cc/products/t-display-s3?variant=42589373268149
[2]: https://www.lilygo.cc/products/t-display-s3?variant=42351558590645
[3]: https://www.lilygo.cc/products/t-display-s3?variant=43164741632181
![DISPLAY](image/T-DISPLAY-S3.jpg)
## 2⃣Examples
## T-Display-S3 TOUCH Pinout
```
./examples/
├── Arduino_GFXDemo
├── Arduino_GFX_PDQgraphicstest
├── GetBatteryVoltage
├── I2CScan
├── ImageScroll
├── MPR121TouchSensor
├── PCBClock
├── PokerS3
├── SerialExample
├── T-Display-S3-MIDI
├── TFT_Rainbow
├── factory
├── lv_demos
├── nes
├── ota
├── sd
├── tft
├── touch_test
└── usb_hid_pad
```
![TOUCH](image/T-DISPLAY-S3-TOUCH.png)
## 3⃣ PlatformIO Quick Start (Recommended)
## Where to buy
T-Display-S3 is available from: [LILYGO](https://www.lilygo.cc/products/t-display-s3), [Amazon](https://www.amazon.com/dp/B0B7X5RVTH?ref=myi_title_dp) and [Aliexpress](https://www.aliexpress.com/item/3256804310228562.html).
## Quick Start
### Arduino
**Please use Arduino ESP32 version below 3.0. There are too many changes in version 3.0 and it has not been updated yet.**
* [T-Display-S3 Arduino IDE Record](https://www.youtube.com/watch?v=PgtxisFvMcc)
1. In Arduino Preferences, on the Settings tab, enter the `https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json` URL in the `Additional boards manager URLs` input box.
2. Click OK and the software will install.
3. Search for ESP32 in Tools → Board Manager and install `esp32` (Arduino-ESP32)
4. Copy everything from this repository lib folder to [Arduino library folder](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries#manual-installation) (e.g. `C:\Users\YourName\Documents\Arduino\libraries`)
5. Select the correct settings in the Tools menu as shown below.
![Arduino](./image/Arduino.png)
#### Writing as a beginner
- When opening the Arduino IDE, you will be prompted that there are new libraries that can be updated. Please do not click update. There is no guarantee that it can be compiled, run, etc. after the update. Make sure that the board is running normally before deciding whether to update. You have to Know that problems may occur after updating due to library differences, or the default configuration (such as TFT_eSPI) will be overwritten.
- If it runs abnormally after the update, please follow Article 4 of the Arduino Quick Start to delete the directory in libraries, and drag the folder in lib into the libraries directory again.
### PlatformIO
1. Install [VisualStudioCode](https://code.visualstudio.com/) and [Python](https://www.python.org/)
1. Install [Visual Studio Code](https://code.visualstudio.com/) and [Python](https://www.python.org/)
2. Search for the `PlatformIO` plugin in the `VisualStudioCode` extension and install it.
3. After the installation is complete, you need to restart `VisualStudioCode`
4. After restarting `VisualStudioCode`, select `File` in the upper left corner of `VisualStudioCode` -> `Open Folder` -> select the `T-Display-S3` directory
5. Click on the `platformio.ini` file, and in the `platformio` column, cancel the sample line that needs to be used, please make sure that only one line is valid
6. Click the (✔) symbol in the lower left corner to compile
7. Connect the board to the computer USB
8. Click (→) to upload firmware
9. Click (plug symbol) to monitor serial output
4. After restarting `VisualStudioCode`, select `File` in the upper left corner of `VisualStudioCode` -> `Open Folder` -> select the `LilyGO AMOLED Series` directory
5. Wait for the installation of third-party dependent libraries to complete
6. Click on the `platformio.ini` file, and in the `platformio` column
7. Uncomment one of the lines `default_envs = xxxx` to make sure only one line works
8. Click the (✔) symbol in the lower left corner to compile
9. Connect the board to the computer USB
10. Click (→) to upload firmware
11. Click (plug symbol) to monitor serial output
12. If it cannot be written, or the USB device keeps flashing, please check the **FAQ** below
## 4⃣ Arduino IDE Manual installation
### ESP-IDF
1. Install [Arduino IDE](https://www.arduino.cc/en/software)
2. Install [Arduino ESP32 V 2.0.5 or above and below V3.0](https://docs.espressif.com/projects/arduino-esp32/en/latest/)
3. Download `T-Display-S3` , move to Arduino library folder (e.g. C:\Users\YourName\Documents\Arduino\libraries)
4. Copy all folders in [lib folder](./lib/) to Arduino library folder (e.g. C:\Users\YourName\Documents\Arduino\libraries)
5. Enter the downloaded `T-Display-S3/examples` directory
6. Select any example and double-click the `any_example.ino` to open it
7. Open ArduinoIDE ,`Tools` Make your selection according to the table below
| Arduino IDE Setting | Value |
| ------------------------------------ | --------------------------------- |
| Board | **ESP32S3 Dev Module** |
| Port | Your port |
| USB CDC On Boot | Enable |
| CPU Frequency | 240MHZ(WiFi) |
| Core Debug Level | None |
| USB DFU On Boot | Disable |
| Erase All Flash Before Sketch Upload | Disable |
| Events Run On | Core1 |
| Flash Mode | QIO 80MHZ |
| Flash Size | **16MB(128Mb)** |
| Arduino Runs On | Core1 |
| USB Firmware MSC On Boot | Disable |
| Partition Scheme | **16M Flash(3M APP/9.9MB FATFS)** |
| PSRAM | **OPI PSRAM** |
| Upload Mode | **UART0/Hardware CDC** |
| Upload Speed | 921600 |
| USB Mode | **CDC and JTAG** |
* The options in bold are required, others are selected according to actual conditions.
The installation method varies depending on the system, refer to the [official manual](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html) for installation.
8. Click `upload` , Wait for compilation and writing to complete
9. If it cannot be written, or the USB device keeps flashing, please check the **FAQ** below
- Using IDF version 4.4
* You can also choose `LilyGo T-Display-S3` as the board, but the partition table is fixed to **16M Flash (3M APP/9.9MB FATFS)**
* [T-Display-S3 Arduino IDE Record](https://www.youtube.com/watch?v=PgtxisFvMcc)
### Micropython
## 5⃣ ESP-IDF
- [russhughes/st7789s3_mpy](https://github.com/russhughes/st7789s3_mpy)
- [Micropython](https://github.com/Xinyuan-LilyGO/lilygo-micropython)
* `T-Display-S3` esp-idf version example, please jump to this [LilyGo-Display-IDF](https://github.com/Xinyuan-LilyGO/LilyGo-Display-IDF)
## 6⃣ Micropython
* [russhughes/st7789s3_mpy](https://github.com/russhughes/st7789s3_mpy)
* [Micropython](https://github.com/Xinyuan-LilyGO/lilygo-micropython)
## FAQ
# 7⃣ ESP32 basic examples
* [BLE Examples](https://github.com/espressif/arduino-esp32/tree/master/libraries/BLE)
* [WiFi Examples](https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi)
* [SPIFFS Examples](https://github.com/espressif/arduino-esp32/tree/master/libraries/SPIFFS)
* [FFat Examples](https://github.com/espressif/arduino-esp32/tree/master/libraries/FFat)
* For more examples of esp32 chip functions, please refer to [arduino-esp32-libraries](https://github.com/espressif/arduino-esp32/tree/master/libraries)
# 8⃣ Resource
| Product(PinMap) | schematic | Dimensions | PCB 3D | PinMap |
| ----------------------- | ------------------------------------------------------- | --------------------------- | ----------------------------------------- | ---------------------------------------- |
| [T-Display-S3][1] | [schematic](./schematic/T_Display_S3.pdf) | [DWG](./dimensions/PCB.dwg) | [STP](./dimensions/t-display-s3-full.stp) | [PinMap](./image/T-DISPLAY-S3.png) |
| [T-Display-S3 Touch][1] | [schematic](./schematic/T_Display_S3.pdf) | [DWG](./dimensions/PCB.dwg) | [STP](./dimensions/t-display-s3-full.stp) | [PinMap](./image/T-DISPLAY-S3-TOUCH.jpg) |
| [T-Display-S3-MIDI][1] | [schematic](./schematic/SCH_T-Display-S3-MIDI_V1.1.pdf) | DWG | STP | |
## 9⃣ FAQ
1. The program can be written normally, but there is still no display after writing
1. There are factory test files in the firmware folder, which can be flashed into the board to check whether the board is normal. If there is still no display, then it can be judged that there is a problem with the board or the screen
2. Delete the <TFT_eSPI> in the libraries, and replace the <TFT_eSPI> in the <lib> folder of the main page to the libraries directory
3. When opening the Arduino IDE, it prompts whether to upgrade the library, please choose not to upgrade, otherwise it will overwrite the configuration of the <TFT_eSPI> display
* If you are using **TFT_eSPI**, then you can try running `Arduino_GFXDemo` first. If nothing is displayed after writing, you can determine that there is a problem with the hardware.
* If `Arduino_GFXDemo` is written normally, but **TFT_eSPI** is not displayed, then it can be judged that `User_Setup_Select` has been overwritten, then please read the third article of **FAQ** to reconfigure **TFT_eSPI**
2. How to update **TFT_eSPI**, or confirm whether the **TFT_eSPI** pin configuration is correct?
* Search for **TFT_eSPI** in the ArduinoIDE library manager and click Update.
* Enter the default library manager installation location and open the **TFT_eSPI** folder. The default installation location is:(e.g. C:\Users\YourName\Documents\Arduino\libraries)
* Open User_Setup_Select.h, comment out #include <User_Setup.h> which is enabled by default, or delete it
* Search **Setup206_LilyGo_T_Display_S3**, find it, cancel the previous comment, then save it, and finally close it, so that TFT_eSPI uses the pin definition of T-Display-S3 by default
```c
#include <User_Setups/Setup206_LilyGo_T_Display_S3.h> // For the LilyGo T-Display S3 based ESP32S3 with ST7789 170 x 320 TFT
```
3. Can't upload any sketchPlease enter the upload mode manually.
* Connect the board via the USB cable
* Press and hold the **BOOT** button , While still pressing the **BOOT** button
* Press **RST** button
* Release the **RST** button
* Release the **BOOT** button (If there is no **BOOT** button, disconnect IO0 from GND.)
* Upload sketch
* Press the **RST** button to exit download mode
4. If you use external power supply instead of USB-C, please turn off the CDC option. This is because the board will wait for USB access when it starts.
* For Arduino IDE users, it can be turned off in the options , Please note that turning off USB CDC will turn off Serial redirection to USBC. At this time, you will not see any Serial message output when opening the port from USB-C, but output from GPIO43 and GPIO44.
```c
Tools -> USB CDC On Boot -> Disable
```
* For platformio users, you can add the following compilation flags in the ini file
```c
build_flags =
; Enable UARDUINO_USB_CDC_ON_BOOT will start printing and wait for terminal access during startup
; -DARDUINO_USB_CDC_ON_BOOT=1
; Enable UARDUINO_USB_CDC_ON_BOOT will turn off printing and will not block when using the battery
-UARDUINO_USB_CDC_ON_BOOT
```
5. If all the above are invalid, please flash the factory firmware for quick verification, please check [here](./firmware/README.MD)
6. Can I use an external 5V pin for power? Please see here [issues/205](https://github.com/Xinyuan-LilyGO/T-Display-S3/issues/205)
2. The board uses USB as the JTAG upload port. When printing serial port information on USB_CDC_ON_BOOT configuration needs to be turned on.
If the port cannot be found when uploading the program or the USB has been used for other functions, the port does not appear.
Please enter the upload mode manually.
1. Connect the board via the USB cable
2. Press and hold the BOOT button , While still pressing the BOOT button, press RST
3. Release the RST
4. Release the BOOT button
5. Upload sketch
3. If the above is invalid, burn the [binary file](./firmware/README.MD) to check whether the hardware is normal
- [Video](https://youtu.be/L-W3dCMtEdo)