mirror of
https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library.git
synced 2026-03-05 15:54:11 +01:00
ba8d305da67e97b4d067f601c089eb7287ea2f78
English | 中文
The code bin will demonstrate the basic functionality of T-Watch, including all on-board chips from T-Watch, using the latest lvgl6.0 as the display graphics framework.
Characteristics:
- The library already contains all the hardware drivers for
T-Watch - Using TFT_eSPI as the display driver, you can directly call TFT_eSPI through the construction object.
- Using lvgl 6.0 as the display graphics framework, the driver method has been implemented, you only need to call lvgl api according to your own needs.
- For the use of lvgl please refer to lvgl docs
Installing
- 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
How to find the sample program
- In the Arduino board select
TTGO T-Watch - In the Arduino File -> Examples -> TTGO T-Watch
Note
- If you don't have the
TTGO T-Watchoption in your board manager, please update the esp32 board as follows:- Using Arduino IDE Boards Manager (preferred)
- Using Arduino IDE with the development repository
Precautions:
- Since Twatch uses a special IO as the SD interface, please remove the SD card when downloading the program.
About power consumption:
-
Currently off the screen, turn off WiFi, Bluetooth and other peripherals consume about 4mA (non-deep sleep), turn on the screen power, do not turn on WiFi, Bluetooth and other peripherals around 65mA, please refer to
example -> SimpleWatchfor the specific code.Off screen power consumption
Open screen power consumption
Architecture diagram
3D Shell
Core Board Pinout
TFT
| ESP32 Core | GPIO5 | GPIO19 | GPIO18 | GPIO27 |
|---|---|---|---|---|
| ST7789V | CS | MOSI | SCLK | DC |
Button
| ESP32 Core | GPIO36 |
|---|---|
| User Button | Button |
Sensor
| ESP32 Core | GPIO21 | GPIO22 | GPIO39 |
|---|---|---|---|
| BMA423 | SDA | SCL | Interrupt |
PMU
| ESP32 Core | GPIO21 | GPIO22 | GPIO35 |
|---|---|---|---|
| AXP202 | SDA | SCL | Interrupt |
RTC
| ESP32 Core | GPIO21 | GPIO22 | GPIO37 |
|---|---|---|---|
| PCF8563 | SDA | SCL | Interrupt |
TOUCH
| ESP32 Core | GPIO23 | GPIO32 | GPIO38 |
|---|---|---|---|
| FT6236U | SDA | SCL | Interrupt |
TF Card
| ESP32 Core | GPIO13 | GPIO15 | GPIO2 | GPIO14 |
|---|---|---|---|---|
| TF Card | CS | MOSI | MISO | SCLK |
Bottom plate Pinout
Standard
| ESP32 Core | GPIO33 | GPIO25 | GPIO21 | GPIO22 |
|---|---|---|---|---|
| Standard | Motor | Speaker | SDA | SCL |
- Onboard SD card slot
SIM800L
| ESP32 Core | GPIO14 | GPIO15 | GPIO4 | GPIO33 | GPIO34 |
|---|---|---|---|---|---|
| SIM800L | RST | PWKEY | BOOST_CTRL | TX | RX |
- No onboard SD card slot
MPR121
| ESP32 Core | GPIO21 | GPIO22 |
|---|---|---|
| MPR121 | SDA | SCL |
- Onboard SD card slot
S7XG_Lora & GPS
| ESP32 Core | GPIO33 | GPIO34 |
|---|---|---|
| S7XG_Lora | TX | RX |
- Onboard SD card slot
More interesting projects:
Languages
C
97.4%
C++
2.5%



