T-Display-S3/README.md

181 lines
12 KiB
Markdown
Raw Normal View History

2022-07-01 08:14:00 +00:00
<h1 align = "center"> 🌟T-Display-S3🌟</h1>
2023-10-16 09:04:28 +00:00
[![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)
2024-02-01 06:45:27 +00:00
[![Arduino_CI](https://github.com/Xinyuan-LilyGO/T-Display-S3/actions/workflows/arduino_ci.yml/badge.svg)](https://github.com/Xinyuan-LilyGO/T-Display-S3/actions/workflows/arduino_ci.yml)
2023-10-16 09:04:28 +00:00
2024-01-31 10:12:24 +00:00
## 1⃣Support Product
| 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] | | | | | |
[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
## 2⃣Examples
```
./examples/
2024-02-01 06:45:27 +00:00
├── Arduino_GFXDemo # Arduino_GFX example
├── Arduino_GFX_PDQgraphicstest # Arduino_GFX example
├── GetBatteryVoltage # Get battery voltage example
├── I2CScan # Scan for external devices using I2C
├── ImageScroll # Image scrolling example by @Rudi Ackermann
├── MPR121TouchSensor # Example of using MPR121 capacitive touch
├── PCBClock # TFT_eSPI PCBClock example by @VolosR
├── PokerS3 # TFT_eSPI PokerS3 example by @VolosR
├── SerialExample # Example of using serial communication
├── T-Display-S3-MIDI # T-Display-S3-MIDI Shield example
├── TFT_Rainbow # TFT_eSPI example
├── factory # factory example
├── lv_demos # lvgl demo
├── nes # NES game emulator
├── ota # Over-the-air upgrade example
├── sd # T-Display-TF Shield example
├── tft # TFT_eSPI example
├── touch_test # Capacitive touch test example
2024-05-25 07:05:31 +00:00
├── usb_hid_pad # Capacitive Touch Screen Simulation USB HID Example
2024-05-25 07:06:39 +00:00
├── ULP_ADC # Example of ADC detection for ULP-FSM(arduino_esp32 version: 3.0.0-rc3)
└── ULP_Count # Example of register counting for ULP-FSM(arduino_esp32 version: 3.0.0-rc3)
2024-01-31 10:12:24 +00:00
```
## 3⃣ PlatformIO Quick Start (Recommended)
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`
2024-04-06 07:48:53 +00:00
4. After restarting `VisualStudioCode`, select `File` in the upper left corner of `VisualStudioCode` -> `Open Folder` -> select the `T-Display-S3` directory
2024-01-31 10:12:24 +00:00
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
1. Install [Arduino IDE](https://www.arduino.cc/en/software)
2024-09-09 01:08:36 +00:00
2. 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. **Please pay attention to the version. The test phase is using 2.0.14. It is not certain that versions above 2.0.14 can run. When the operation is abnormal, please downgrade to a version below 2.0.14.** , As of 2024/08/02, TFT_eSPI does not work on versions higher than 2.0.14, see [TFT_eSPI/issue3329](https://github.com/Bodmer/TFT_eSPI/issues/3329)
2024-01-31 10:12:24 +00:00
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.
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
* 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)**
2024-01-05 01:31:07 +00:00
* [T-Display-S3 Arduino IDE Record](https://www.youtube.com/watch?v=PgtxisFvMcc)
2024-01-31 10:12:24 +00:00
## 5⃣ ESP-IDF
2024-01-05 01:31:07 +00:00
2024-01-31 10:12:24 +00:00
* `T-Display-S3` esp-idf version example, please jump to this [LilyGo-Display-IDF](https://github.com/Xinyuan-LilyGO/LilyGo-Display-IDF)
2023-11-20 02:03:36 +00:00
2024-01-31 10:12:24 +00:00
## 6⃣ Micropython
2023-11-20 02:03:36 +00:00
2024-01-31 10:12:24 +00:00
* [russhughes/st7789s3_mpy](https://github.com/russhughes/st7789s3_mpy)
* [Micropython](https://github.com/Xinyuan-LilyGO/lilygo-micropython)
2023-01-31 14:29:59 +00:00
2023-06-17 01:04:07 +00:00
2024-01-31 10:12:24 +00:00
# 7⃣ ESP32 basic examples
2023-06-17 01:04:07 +00:00
2024-01-31 10:12:24 +00:00
* [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)
2022-10-11 10:37:55 +00:00
2022-07-01 08:14:00 +00:00
2024-01-31 10:12:24 +00:00
# 8⃣ Resource
2022-07-01 08:14:00 +00:00
2024-01-31 10:12:24 +00:00
| 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.jpg) |
| [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.png) |
2024-01-31 10:12:24 +00:00
| [T-Display-S3-MIDI][1] | [schematic](./schematic/SCH_T-Display-S3-MIDI_V1.1.pdf) | DWG | STP | |
2023-03-13 08:59:37 +00:00
2024-01-31 10:12:24 +00:00
## 9⃣ FAQ
2023-06-17 00:55:05 +00:00
2024-02-01 01:21:34 +00:00
1. **The screen does not light up when using battery?**
* When T-Display-S3 is powered by battery, GPIO15 must be set to HIGH to turn on the backlight.
* Please add the following two lines at the beginning of the setup
```C++
void setup(){
//Turn on display power
pinMode(15, OUTPUT);
digitalWrite(15, HIGH);
}
```
2. **The program can be written normally, but there is still no display after writing**
2024-01-31 10:12:24 +00:00
* 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**
2024-02-01 01:21:34 +00:00
3. **How to update **TFT_eSPI**, or confirm whether the **TFT_eSPI** pin configuration is correct?**
2024-01-31 10:12:24 +00:00
* 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
2024-02-01 01:21:34 +00:00
```c++
2024-01-31 10:12:24 +00:00
#include <User_Setups/Setup206_LilyGo_T_Display_S3.h> // For the LilyGo T-Display S3 based ESP32S3 with ST7789 170 x 320 TFT
```
2024-02-01 01:21:34 +00:00
4. **Can't upload any sketchPlease enter the upload mode manually.**
2024-01-31 10:12:24 +00:00
* 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
2024-02-01 01:21:34 +00:00
5. **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.**
2024-01-31 10:12:24 +00:00
* 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 =
2024-02-01 10:01:38 +00:00
; Enable -DARDUINO_USB_CDC_ON_BOOT will start printing and wait for terminal access during startup
2024-01-31 10:12:24 +00:00
; -DARDUINO_USB_CDC_ON_BOOT=1
2024-02-01 10:01:38 +00:00
; Enable -UARDUINO_USB_CDC_ON_BOOT will turn off printing and will not block when using the battery
2024-01-31 10:12:24 +00:00
-UARDUINO_USB_CDC_ON_BOOT
```
2024-02-01 01:21:34 +00:00
6. **If all the above are invalid, please flash the factory firmware for quick verification, please check [here](./firmware/README.MD)**
7. **Can I use an external 5V pin for power? Please see here [issues/205](https://github.com/Xinyuan-LilyGO/T-Display-S3/issues/205)**
2024-03-05 05:48:18 +00:00
9. The default charging current is set at 500mA per hour. If you need to adjust the charging current, please see this [issue](https://github.com/Xinyuan-LilyGO/T-Display-S3/issues/230)
2024-02-26 03:16:59 +00:00