Git Product home page Git Product logo

lvgl8-wt32-sc01-arduino's Introduction

Latest project with multiple device support is here

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

Graphics & Touch on WT32-SC01

device

  • Board : WT32-SC01 from Wireless Tag (Seeed Studio also carries the same)
    Similiar display from DFRobot uses ILI9488 (not ST7796S)
  • Graphics & Touch Driver : LovyanGFX
  • UI/Widgets : LVGL8.x
  • Framework : Arduino + PlatformIO (ESP-IDF sample here)

Demo code output

device

WT32-SC01 Specs

Pros:

  • ESP32 WROVER-B
  • 3.5" 480x320 ST7796S TFT Display
  • Capacitive touchscreen FT6336U
  • Default 4MB Flash & 8MB PSRAM
  • Two external expansion female pin headers with same pin-out (mirrored)
  • 2 x 3.3v LDO, 1 for the board and 1 for the external expansion
  • Separate Battery/External power option with voltage range 5v-9v
  • USB-C for power and programming

Cons:

  • No SD Card storage option
  • 16MB Flash version available but only through Alibaba (didn't know when I ordered)
  • Pin headers are 2mm pitch which is not breadboard standard (2.54mm is common).
  • Mounting holes in the wrong place so you cannot use it (fixed in newer revisions)

Board config

  • TFT (ST7796)
    • TFT_RST=22
    • TFT_SCLK=14
    • TFT_DC=21
    • TFT_CS=15
    • TFT_MOSI=13
    • TFT_MISO=-1
    • TFT_BCKL=23
  • Touch (FT6336U)
    • TOUCH_SDA=18
    • TOUCH_SCL=19
    • I2C_TOUCH_ADDRESS=0x38

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

lvgl8-wt32-sc01-arduino's People

Contributors

sukesh-ak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lvgl8-wt32-sc01-arduino's Issues

platformio+arduino+esp32+ST7789+FT6336U+problem!

ask for your advice!
my configuration is as follows:

cfg.pin_sclk = 18;
cfg.pin_mosi = 19;
cfg.pin_miso = -1;
cfg.pin_dc = 16;
cfg.pin_cs = 5;
cfg.pin_rst = 23;
cfg.pin_bl = 4;

cfg.i2c_port = 1;
cfg.i2c_addr = 0x38;
cfg.pin_sda = 22;
cfg.pin_scl = 21;

how should it be configured?
Touch not working!!!

Basic example

Hello,

When i use basic example successfully flash and boot but screen is not starting.

`
/*
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);
}
}
`

platform.io.ini

[env:esp32dev]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
lib_deps =
bblanchon/ArduinoJson@^6.20.0
ottowinter/ESPAsyncWebServer-esphome@^3.0.0
lovyan03/LovyanGFX@^1.1.2
monitor_speed = 115200
board_upload.flash_size = 16MB
board_build.flash_mode = dio
build_flags =
-D CONFIG_ESP32_PSRAM_ENABLE=1
-D ARDUINO_USB_CDC_ON_BOOT

Thanks for this repo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.