mirror of
https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library.git
synced 2026-03-07 00:26:56 +01:00
e159053bbebc2bf1157544f3f675f9bb3733ca3f
🌟LilyGO T-Watch🌟
English | 中文
News:
- Currently
T-Watch-Libis only compatible withT-Watch S3version, esp32 version is planned to support
1️⃣ PlatformIO Quick Start
- Install Visual Studio Code and Python
- Search for the
PlatformIOplugin in theVisualStudioCodeextension and install it. - After the installation is complete, you need to restart
VisualStudioCode - After restarting
VisualStudioCode, selectFilein the upper left corner ofVisualStudioCode->Open Folder-> select theTTGO_TWatch_Librarydirectory - Wait for the installation of third-party dependent libraries to complete
- Click on the
platformio.inifile, and in theplatformiocolumn, cancel the sample line that needs to be used, please make sure that only one line is valid - Click the (✔) symbol in the lower left corner to compile
- Connect the board to the computer USB
- Click (→) to upload firmware
- Click (plug symbol) to monitor serial output
2️⃣ Arduino IDE Quick Start
- Install Arduino IDE
- Install Arduino ESP32
- Install TTGO_TWatch_Library
- Download a zipfile from github using the "Download ZIP" button and install it using the IDE ("Sketch" -> "Include Library" -> "Add .ZIP Library...")
- Clone this git repository into your sketchbook/libraries folder. For more info, see https://www.arduino.cc/en/Guide/Libraries
- Install T-Watch-Deps
- Copy all directories in T-Watch-Deps to
<C:\Users\UserName\Documents\Arduino\libraries>, if there is nolibrariesdirectory, please create it. - Please note that instead of copying the
T-Watch-Depsdirectory, copy the folders in theT-Watch-Depsdirectory to - Please note that currently only <TFT_eSPI> has been preconfigured , after upgrading <TFT_eSPI>, you need to re-move <extras/Setup212_LilyGo_T_Watch_S3.h> to <TFT_eSPI/User_Setups> directory, and in TFT_eSPI/User_Setup_Select.h add
#include <User_Setups/Setup212_LilyGo_T_Watch_S3.h>
- Copy all directories in T-Watch-Deps to
- Open ArduinoIDE -> Tools
- Board -> ESP32S3 Dev Module
- USB CDC On Boot -> Enable ## Note that you need to change Enable to Disable when USB is not connected, so USB CDC will not prevent the board from starting
- CPU Frequency -> 240MHz
- USB DFU On Boot -> Disable
- Flash Mode -> QIO 80MHz
- Flash Size -> 16MB(128Mb)
- USB Firmware MSC On Boot -> Disable
- PSRAM -> OPI PSRAM
- Partition Scheme -> 16M Flash(3MB APP/9.9MB FATFS)
- USB Mode -> Hardware CDC and JIAG
- Upload Mode -> UART0/Hardware CDC
- Upload Speed -> 921600
- Insert USB into the PC and click Upload <If the upload fails, View the FAQ below>
4️⃣ Example Source
- display directory examples are all from TFT_eSPI internal examples
- lvgl directory examples are all from lvgl internal examples
- radio directory examples are all from RadioLib internal examples
- peripheral directory examples are all from XPowersLib & SensorsLib internal examples
5️⃣ ESP32 basic examples
- BLE Examples
- WiFi Examples
- SPIFFS Examples
- OTA Examples
- FFat Examples
- For more examples of esp32 chip functions, please refer to ardioio-esp32-libraries
6️⃣ FAQ
- Unable to upload sample
- Make sure that the T-Watch is turned on, you can check it according to the following method, open the computer device manager, check the port, plug the USB port into the computer, and if the new COM device is displayed, it has been turned on, if it is not displayed, press the crown Press the button on the button for one second, and then the device port will pop up, click upload at this time
- The USB port of the device keeps connecting and disconnecting repeatedly
- This is the abnormal operation of the program and the phenomenon caused by the continuous restart of the esp32. First, open the Arduino IDE, select the corresponding port, and then shut down the T-Watch first (keep the USB connected to the computer, press and hold the crown, and then until the USB device is not in the list), then click upload, wait for the sketch compilation to be completed, and press the crown for one second to start the machine. At this time, it should be able to upload normally. This method needs to grasp the time
- If the first method cannot grasp the time, you can use the second method, first plug in the USB, shut down the T-Watch, and then remove the USB cable after seeing that there is no device displayed in the USB port, and disassemble the T-Watch On the back cover, there is a button on the PCB, press and hold the button, and then insert the USB cable, at this time T-Watch enters the download mode, click upload, after the upload is complete, you need to shut down the T-Watch, and then turn it on again, the program will be normal run.
- Where to query the pin definition?
- Look here
- The screen is not displayed after uploading the sketch?
- Please check the fourth line of Arduino IDE Quick Start
Languages
C
97.4%
C++
2.5%