wfdudley / T-watch-2020

a watch project for the TTGO T-watch-2020 version 1
BSD 3-Clause "New" or "Revised" License
85 stars 27 forks source link

T-watch-2020

a watch project for the TTGO T-watch-2020 version 1

This work is licensed under the BSD 3-clause license. See LICENSE.txt.

This builds with Arduino IDE version 1.8.13. It also requires:

This is a "sketch" in Arduino parlance, not a library. That means you should do the "git clone" or unpack the zip file in the place where your Arduino sketches live. It also means that you should rename the directory in which the code lives to "DudleyWatch", so it matches the name of the .ino file. Or change the name of the .ino file to be the same as the directory (but with the .ino extension); I think either one should work.

Also note that when building with the Arduino IDE, you must set the partitioning to the special T-watch partitioning scheme: 2x6.5 MB APP, 3.6MB SPIFFS.

For more on building this sketch, see Using this code on your watch, below. For beginner/newbie instructions, starting from "I have a computer, but have not installed Arduino", then read these beginner instructions.

I took bits from Dan Geiger's watch code (https://www.instructables.com/Lilygo-T-Watch-2020-Arduino-Framework/), and bits from SimpleWatch (the shipped demo), and added many new features.

Existing Features

New Features

Using this code on your watch

To use this code, edit personal_info.h to have the IP, port, username, password of your MQTT server (assuming you have one), plus your home latitiude, longitude, and city, and also your openweathermap.org API key. Edit my_WiFi.h to have the SSID's, passwords, and timezones of all the WiFi access points you want your watch to connect with. If you have an MQTT installation, edit appMQTT.h to change my topics to your topics. Finally, compile and upload to your watch.

warning about the LVGL User Interface

The LVGL UI is used to build the setup, WiFi, and alarm screens with all the dropdowns, buttons, etc. The text entry boxes put up a keyboard when touched. When you have finished entering your text into the box (WiFi password, for example), make sure that you hit the checkmark on the keyboard. This ensures that the characters you have entered are seen by the UI.

Gestures Mapping

From the watch display, the following gestures work:

In the scientific calculator, the following gestures work:

To compute 2 + 3, do: 2, swipe down, 3, +

Screen Shots


"LCARS" watch face

"LilyGoGui" watch face

Analog watch face

Conway's Life

settings page 4

alarm settings page 1

MQTT client sensor page

MQTT client control page

Stop Watch

Scientific Calculator page 1

Scientific Calculator page 2

Maze game

Weather App

WiFi scanner App

Stop Watch App

Stop Watch App, Tea Timer function

Stop Watch App, Tea Timer function

Stop Watch App, Tea Timer function