Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
LILYGO
Published © MIT

T-Watch Demo 1 : Display Text

How to input text on T-watch display

BeginnerFull instructions provided1 hour387
T-Watch Demo 1 : Display Text

Things used in this project

Hardware components

LilyGo T-Watch
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Text.ino

Arduino
#include "config.h"

TTGOClass *ttgo;

void setup()
{
    ttgo = TTGOClass::getWatch();
    ttgo->begin();
    ttgo->openBL();
    ttgo->lvgl_begin();

    lv_obj_t *text = lv_label_create(lv_scr_act(), NULL);
    lv_label_set_text(text, "T-Watch");
    lv_obj_align(text, NULL, LV_ALIGN_CENTER, 0, 0);
}

void loop()
{
    lv_task_handler();
    delay(5);
}

config.h

Arduino
config file
// => Hardware select
 #define LILYGO_WATCH_2019_WITH_TOUCH     // To use T-Watch2019 with 



// => Function select
#define LILYGO_WATCH_LVGL                   //To use LVGL, you need to enable the macro LVGL

#include <LilyGoWatch.h>

Credits

LILYGO
11 projects • 28 followers
LILYGO is a engineering team of open source software and hardware.
Contact

Comments

Please log in or sign up to comment.