T-Display-S3: Getting Started
by blankunderscore in Circuits > Arduino
9261 Views, 7 Favorites, 0 Comments
T-Display-S3: Getting Started
A step-by-step guide to getting started with the ESP32 using the Lilygo T-Display-S3. All root material can be found at the github repository found here:
https://github.com/Xinyuan-LilyGO/T-Display-S3
Boards can be procured from aliexpress here: <non-affiliate link> https://www.aliexpress.us/item/3256804310228562.html?
Supplies
https://www.aliexpress.us/item/3256804310228562.html?
USB-C cable (with data connections)
Arduino IDE
Prerequisites
Several precursors must be completed prior to getting started with the Lilygo T-Display-S3 board. The following enumerated list is expected to be completed prior to following this guide:
- Installation of latest Arduino IDE
- Procurement of materials in Supplies list
Adding ESP32 to Board Manager
Adding ESP32 to Board Manager (Optional)
- In the Arduino IDE goto: Tools->Boards->Board Manager
- Search for 'espressif'
- Install esp32 by Espressif Systems
Adding Lilygo T-Display-S3 to Board Manager
Adding Lilygo T-Display-S3 to Board Manager
- In the Arduino IDE goto: File->Preferences (Ctrl+Comma on Windows)
- Click the icon next to 'Additional Boards Manager URLs:" as highlighted in orange below:
- Add the following URL to the board manager being sure to only have one URL per line:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
The board manager should look like this:
Now click 'OK' and restart the Arduino IDE. The Arduino IDE should automatically install the boards required for utilizing the LilyGo T-Display-S3.
Installing Libraries and Examples
Adding libraries to Arduino IDE
- Clone or download the folders located in the \lib directory to your local Arduino libraries folder (typically C:\Users\%USER%NAME\Documents\Arduino\libraries)
- Folders are located at the github repository: https://github.com/Xinyuan-LilyGO/T-Display-S3/tree/main/lib
- In the root folder (https://github.com/Xinyuan-LilyGO/T-Display-S3) you can use the green '<> Code' dropdown to download a .zip file containing the entire repository
- Your libraries folder should look like this:
- After a successful install the folders should show up in Files->Examples (all the way at the bottom)
Flash Basic Sketch to the Board
Flash simple sketch to the Lilygo T-Display-S3
- Connect the Lilygo T-Display-S3 to your computer using a USB-C cable
- Note: Many USB cables do not come with data wiring and only wiring for power, be sure to use a proper cable
- Select the port used for the board (Tools -> Port)
- Select the board ESP32S3 Dev Module from the Boards Manager (Tools->Board->esp32->ESP32S3 Dev Module)
- Utilize the following settings if desired:
At this point you can install one of the example sketches, personally I always prefer to blink an LED off of one of the GPIO pins. Here's some code to blink an LED from GPIO21:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(21, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Setting pin 21 high");
digitalWrite(21, HIGH);
delay(1000);
Serial.println("Setting pin 21 low");
digitalWrite(21, LOW);
delay(1000);
}
Tips & Debugging
- Use board as delivered. Connect board to usb to computer without touching anything else. Upload the code. The code will start right after download and run. Unplug the board and connect to usb again. The board will not do anything.
- Use board as delivered. Push down boot button. While boot button is pushed, connect usb to computer. Release boot button. Upload the code. The code will not start right after download. Nothing will happen. Unplug the board and connect to usb again.The board will now boot the code. Unplug the board from USB to computer and connect to other power source like LiPO battery. Again the board will start the code. The computer is not needed again.