mirror of
https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library.git
synced 2026-03-03 06:44:10 +01:00
36 lines
503 B
C++
36 lines
503 B
C++
#include "config.h"
|
|
#include "lv_demo_widgets.h"
|
|
|
|
TTGOClass *ttgo;
|
|
TFT_eSPI *tft;
|
|
|
|
void setup()
|
|
{
|
|
Serial.begin(115200);
|
|
|
|
//Get watch instance
|
|
ttgo = TTGOClass::getWatch();
|
|
|
|
// Initialize the hardware
|
|
ttgo->begin();
|
|
|
|
// Receive as a local variable for easy writing
|
|
tft = ttgo->tft;
|
|
|
|
ttgo->lvgl_begin();
|
|
|
|
// Turn on the backlight
|
|
ttgo->openBL();
|
|
|
|
lv_demo_widgets();
|
|
|
|
}
|
|
|
|
void loop()
|
|
{
|
|
lv_task_handler();
|
|
delay(5);
|
|
}
|
|
|
|
|