Skip to content
MCU Atlas
Walkthrough

T-Watch 2020 getting started: Arduino setup

Set up a LilyGo T-Watch 2020 with Arduino IDE: install the ESP32 core and LilyGoLib, flash a first sketch, and put your own text on a watchface — code included.

By · Published: 11/11/2026 · Updated: 11/11/2026

The LilyGo T-Watch 2020 is a programmable smartwatch built around an ESP32 — the same chip family that runs countless DIY projects on this site. Wi-Fi, Bluetooth, a 1.54-inch colour touchscreen, a real-time clock, a speaker, a microphone, a vibration motor: it's a dev board you can wear. You program it from the Arduino IDE over the same USB cable you charge it with, and in this tutorial you'll go from a sealed box to a watchface with your own name on it.

If you're weighing open-source watches, we compare the T-Watch against the Watchy and the PineTime in our open-source smartwatch comparison — and the sibling PineTime getting-started guide covers the no-soldering path on that other watch. Full specs, buying links and project links for the watch itself live on the T-Watch 2020 parts page.

What you need before starting:

  • A LilyGo T-Watch 2020 (any version; this guide calls out the differences that matter)

  • The Micro-USB cable that comes in the box — and a computer with a spare USB port

  • The free Arduino IDE 2.x (we'll install it together)

  • About an hour, including library downloads

What you're holding: a quick hardware tour

Before the first upload, it helps to know what's inside the T-Watch 2020, because the software you install talks to all of it:

PartWhat it isWhy you care
ESP32-D0WDQ6Dual-core Wi-Fi/Bluetooth microcontroller, up to 240 MHzRuns your Arduino sketches
Display1.54" IPS LCD, 240 × 240, ST7789 driver over SPIYour watchface canvas
TouchFT6336 capacitive touch controllerTaps and swipes
PowerX-Powers AXP202 power-management chipControls charging, battery and sleep
MotionBosch BMA423 accelerometer — or BMA456 on newer production batchesTap-to-wake and step counting
ClockNXP PCF8563 real-time clockKeeps time even when the ESP32 sleeps
Extras (V3)Speaker (MAX98357A amp), PDM microphone, vibration motor, IR transmitterBlinky-noisy projects
Memory16 MB flash, 8 MB PSRAMRoom for big sketches and images

Three versions of the T-Watch 2020 exist (V1, V2 and V3). New units sold today are V3 — you can tell yours at a glance because V3 adds the microphone, and LilyGO's store listing names every variant. The good news: with the current library you select your version from a menu in the IDE (Step 6), so one guide covers them all.

Two details LilyGO's documentation calls out, worth knowing on day one:

  • The battery may ship switched off. LilyGO's store page notes you need to flip the watch on using its switch the first time you power it, and suggests switching the battery off for long storage.

  • It charges over Micro-USB, not USB-C. Older blog posts and listings sometimes say otherwise; the 2020 V3 schematic shows a Micro-USB connector. Use the cable in the box — you'll also need it for uploads, and it must be a data cable, not a charge-only one.

Step 1: Unbox and charge the watch

  1. Lay out the watch and the cable. If your bundle included a strap, fit it now (the spring pins push into the watch's lugs).

  2. Plug the Micro-USB cable into the port on the watch's edge and into your computer or a USB power adapter.

  3. Let it charge while you set up the software. LilyGO's library sets the default charge current to 125 mA — a gentle rate that's normal for a watch this size. LilyGO doesn't publish a battery capacity figure in its docs, so we won't quote one either.

Step 2: Power it on

  1. Hold the button on the side of the watch for about two seconds. The screen lights up with LilyGO's factory interface — a touch demo UI that proves the screen, touch and battery all work.

  2. Take a minute to tap around. This factory UI is itself just a program stored in the watch's flash; everything you see, you can replace.

Step 3: Install the Arduino IDE

  1. Download the Arduino IDE 2.x for your operating system from arduino.cc/en/software and install it.

  2. Open it once so it can finish its first-run setup.

LilyGO's quick-start specifically warns that running Arduino from a Flatpak can break the board-install steps below — use the regular installer for your OS.

Step 4: Add ESP32 board support

The IDE doesn't know about ESP32 boards out of the box, so you add Espressif's board package first:

  1. In the IDE, open File → Preferences (on Windows: File → Preferences; on macOS: Arduino IDE → Settings).

  2. In Additional boards manager URLs, paste: https://espressif.github.io/arduino-esp32/package_esp32_index.json then click OK.

  3. Open Tools → Board → Boards Manager…, search for esp32, and install esp32 by Espressif Systems. This is a large download (it includes the compiler toolchain) — give it a few minutes. LilyGO's guide calls for version 3.3.10 or later; the Boards Manager installs the current release for you.

Step 5: Install LilyGoLib and its companion libraries

LilyGO's devices use one shared library, LilyGoLib, plus a bundle of tested third-party libraries (including LVGL, the UI toolkit the examples use):

  1. Download the LilyGoLib ZIP: github.com/Xinyuan-LilyGO/LilyGoLib/archive/refs/heads/master.zip

  2. In the IDE: Sketch → Include Library → Add .ZIP Library… and pick the ZIP you downloaded.

  3. Download the companion bundle: github.com/Xinyuan-LilyGO/LilyGoLib-ThirdParty (green Code button → Download ZIP), unzip it, and copy each library folder inside it into your Arduino libraries folder — not the outer folder itself:

    • Windows: C:\Users\<you>\Documents\Arduino\libraries
    • macOS: /Users/<you>/Documents/Arduino/libraries
    • Linux: /home/<you>/Arduino/libraries
  4. Restart the IDE so it picks the libraries up.

Why the exact versions matter: LilyGO tests LilyGoLib against specific versions of these libraries (LVGL 9.6, SensorLib 0.5.0 and friends) and notes that updating them independently can break examples. The bundle exists so you don't have to think about it.

Step 6: Open the first example and set the board

  1. Connect the watch with the Micro-USB cable.

  2. Open File → Examples → LilyGoLib → helloworld. (If you don't see a LilyGoLib section, the ZIP install in Step 5 didn't take — redo it.)

  3. Configure Tools exactly like this — this is the table from LilyGO's own quick-start for this watch:

SettingValue
BoardTTGO T-Watch
Board RevisionT-Watch-2020-V3 (or V1/V2 to match your watch)
PSRAMEnabled
Partition SchemeDefault (2 x 6.5 MB app, 3.6 MB SPIFFS)
Upload Speed921600
PortThe port that appears when you plug the watch in

The one setting people get wrong: Board Revision. LilyGO's docs flag it in bold for a reason — leaving it on T-Watch Base selects the 2019 watch's pin map and "will configure several peripherals incorrectly." If your screen, touch or battery reading misbehaves later, check this first.

Step 7: Upload your first sketch

  1. Make sure the watch is powered on (Step 2 — hold the button ~2 seconds). LilyGO's troubleshooting list puts this first: the watch must be on before you upload.

  2. Click the Upload arrow (→) in the IDE. You'll see it compile, then "Connecting…" as it reaches for the watch.

  3. When the IDE prints "Hard resetting via RTS pin…" (or similar), the watch reboots — into your sketch. Hello World with a tappable Button appears on the watch.

  4. Tap the button a few times and watch the counter go up. That tap → counter round-trip is the FT6336 touch controller, the ESP32 and LVGL all doing their jobs.

Open Tools → Serial Monitor at 115200 baud and tap the button again — you'll see the counter printed over USB. That's your debugging channel for everything you build next.

If the upload fails, jump to Troubleshooting below — the fixes are almost always one of three things (watch asleep, charge-only cable, wrong board revision).

Step 8: Your first watchface — with your name on it

"Hello World" proves the pipeline; now let's make it look like a watch. Close the helloworld example (no need to save), open File → New, and paste this complete sketch in. It reads the watch's real-time clock and shows a big clock face plus one line of text you choose:

// my-watchface.ino — a first watchface for the LilyGo T-Watch 2020
// Board: TTGO T-Watch, Board Revision: T-Watch-2020-V3 (or V1/V2)
#include <LilyGoLib.h>
#include <LV_Helper.h>

lv_obj_t *time_label;   // the big clock
lv_obj_t *name_label;   // your line of text

// Once a second, read the PCF8563 real-time clock and redraw the time
static void update_time(lv_timer_t *timer)
{
    RTC_DateTime now = instance.rtc.getDateTime();
    lv_label_set_text_fmt(time_label, "%02u:%02u",
                          now.getHour(), now.getMinute());
}

void setup()
{
    Serial.begin(115200);
    instance.begin();                 // wake up every chip in the watch
    beginLvglHelper(instance);        // start LVGL + the display + touch

    // Big clock, centered, using LVGL's built-in 48-point font
    time_label = lv_label_create(lv_screen_active());
    lv_obj_set_style_text_font(time_label, &lv_font_montserrat_48, 0);
    lv_label_set_text(time_label, "--:--");
    lv_obj_align(time_label, LV_ALIGN_CENTER, 0, -20);

    // ↓↓↓ YOUR CUSTOMIZATION — change this one line ↓↓↓
    name_label = lv_label_create(lv_screen_active());
    lv_label_set_text(name_label, "Hi, I'm your T-Watch");
    lv_obj_align(name_label, LV_ALIGN_CENTER, 0, 40);

    lv_timer_create(update_time, 1000, NULL);  // tick every 1000 ms
    instance.setBrightness(255);               // full brightness
}

void loop()
{
    lv_timer_handler();   // LVGL's heartbeat — always keep this here
    delay(2);
}

Upload it exactly like Step 7. Within a second of the reboot you'll have a giant clock on your wrist.

The clock starts at whatever the RTC last held (a fresh watch may show the wrong time — see the note below), but it is keeping real time from the PCF8563 chip, which continues running while the watch sleeps.

Setting the real time: the simplest beginner route is the ESP32's network time: in setup(), connect to your Wi-Fi with WiFi.begin("YOURSSID", "yourpass") and call configTime(0, 0, "pool.ntp.org"), then push the synced time into the RTC with instance.rtc.setDateTime(...). Wiring that up (including timezone offsets) is a great second session — LilyGoLib's sensor examples show the RTC calls, and the factory UI in the next section can set the clock from its settings screen too.

Step 9: Make the text yours

The customization is deliberately one line. Find this in the sketch above:

lv_label_set_text(name_label, "Hi, I'm your T-Watch");

Change the text between the quotes to anything you like — your name, a date, a goal — and upload again. Thirty seconds from edit to wrist. Congratulations: you've now flashed your own firmware to a smartwatch twice, and every future change is just "edit, upload, wear."

Troubleshooting

  • No port appears when I plug the watch in. Use the cable that came in the box (charge-only Micro-USB cables are common). If the port still doesn't show, LilyGO's docs suggest installing the driver for the onboard USB-to-serial bridge or trying a different USB port.

  • Upload starts but never connects / fails at "Connecting…". First confirm the watch is powered on — hold the side button about two seconds. If it still fails, drop Upload Speed from 921600 to 115200 in Tools and retry.

  • The sketch uploads but the screen is blank or touch is dead. Check Tools → Board Revision. T-Watch Base is the 2019 watch and misconfigures several peripherals on a 2020; set it to T-Watch-2020-V3 (or your version).

  • The watch won't power on at all. Hold the button a full two seconds. Still nothing? Charge it for 30 minutes first — a deeply discharged battery needs time before it will boot — and check the battery switch noted in "What you're holding."

  • I broke everything and want the factory UI back. LilyGO publishes the factory firmware binaries in the LilyGoLib repository's firmware/ folder (for the 2020 V3 the file is named q307-twatch2020v3-factory-…-0x0.bin) with a flashing guide in that folder's README — the same place their support team points to.

Going further

  • Flash the full factory UI source: File → Examples → LilyGoLib → factory — the complete app LilyGO ships on the watch, as a sketch you can gut and remix. It's a big one; treat it as reading material for your third or fourth session.

  • The community firmware: the watch also runs My-TTGO-Watch, an LVGL smartwatch OS with apps and phone notifications that LilyGO has shipped on some units — a ready-made watch if you'd rather not write one.

  • The older tutorials you'll find online mostly use the legacy TTGO_TWatch_Library. It still works, but for a watch bought today LilyGO's current quick-start (the one this guide follows) uses LilyGoLib — start there and you won't fight old pin maps.

  • Want an e-ink watch you can build from a bare board? Read Watchy: the open-source ESP32 e-ink smartwatch — our most-visited project, and the complete opposite philosophy: slow screen, week-long battery, and a flex cable you solder yourself.

  • Or a no-solder watch with polished firmware? The PineTime getting-started guide walks you through InfiniTime and its phone app instead of Arduino.

  • Deciding between all three? Our open-source smartwatch comparison lines up the PineTime, Watchy and T-Watch side by side.

Sources: [1] LilyGoLib T-Watch-2020-V3 quick start, github.com/Xinyuan-LilyGO/LilyGoLib docs/lilygo-t-watch-2020-v3.md (retrieved 2026-11-10). [2] LilyGoLib T-Watch-2020-V3 hardware reference (specs, pin map, 125 mA charge current, BMA423→BMA456 note), docs/hardware/lilygo-t-watch-2020-v3.md (retrieved 2026-11-10). [3] LilyGO T-Watch 2020 V3 product page, lilygo.cc (specs, box contents, battery-switch note; retrieved 2026-11-10). [4] T-Watch 2020 V3 schematic T_WATCH-2020V03.pdf, Xinyuan-LilyGO/TTGO_TWatch_Library (Micro-USB connector; retrieved 2026-11-10). [5] LilyGoLib firmware README (factory firmware binaries and restore guide; retrieved 2026-11-10). [6] LilyGoLib third-party library versions, docs/third_party.md (retrieved 2026-11-10). [7] My-TTGO-Watch repository, github.com/sharandac/My-TTGO-Watch (retrieved 2026-11-10).

Parts Mentioned