sukesh-ak / LVGL8-WT32-SC01-Arduino

ESP32 + WT32-SC01 + LOVYANGFX + LVGL8 with Arduino
The Unlicense
95 stars 34 forks source link
arduino esp32 lovyangfx lvgl

Latest project with multiple device support is here

https://github.com/sukesh-ak/ESP32-TUX

Graphics & Touch on WT32-SC01

device

Demo code output

device

WT32-SC01 Specs

Pros:

Cons:

Board config

Touch and Draw sample (without LVGL)

Replace the content of main.cpp with the following to test quickly
For Ardiuno IDE, install LovyanGFX library then copy & paste the below code into your .ino file and flash!


/*
    Simple Touch Drawing sample for WT32-SC01
*/
#define LGFX_AUTODETECT     // Autodetect board
#define LGFX_USE_V1         // set to use new version of library

#include <LovyanGFX.hpp>    // main library

static LGFX lcd;            // declare display variable

// Variables for touch x,y
static int32_t x,y;

void setup(void)
{
  lcd.init();

  // Setting display to landscape
  if (lcd.width() < lcd.height()) lcd.setRotation(lcd.getRotation() ^ 1);

  lcd.setCursor(0,0);
  lcd.printf("Ready to touch & draw!");
}

void loop()
{
  if (lcd.getTouch(&x, &y)) {
    lcd.fillRect(x-2, y-2, 5, 5, TFT_RED);
    lcd.setCursor(380,0);
    lcd.printf("Touch:(%03d,%03d)", x,y);
  }
}

3D Printable enclosure (STL)

3D enclosure on SketchFab website