witnessmenow / ESP32-Cheap-Yellow-Display

Building a community around a cheap ESP32 Display with a touch screen
MIT License
1.56k stars 158 forks source link

Getting touch working in LGVL examples #97

Closed peteDDD closed 4 months ago

peteDDD commented 9 months ago

The LGVL example uses the following SPIClass mySpi = SPIClass(HSPI); which is different than the TouchTest which uses SPIClass mySpi = SPIClass(VSPI);

I found I could not get the touch working in the LGVL examples without changing this around line 30

//SPIClass mySpi = SPIClass(HSPI); // touch does not work with this setting
SPIClass mySpi = SPIClass(VSPI);  // critical to get touch working

The CYD board I am using is labeled ESP32-2432S028

paelzer commented 9 months ago

Hello, happy new year!!

The same goes for my display version which is also mentioning "ESP32-2432S028" but it's one of these which have two USB ports (micro-USB and USB-C). Touch functionality is only working with:

SPIClass mySpi = SPIClass(VSPI);

This is my board: PXL_20240102_124326093

Grey-Lancaster commented 8 months ago

@paelzer @peteDDD Same baord tft espi example works cannot get the LVGL example to compile copied the 2 folders to src I see the file is there? Using LVGL V9.0 should I uise something older?

F:\Users\greyl\Documents\Arduino\libraries\lvgl\src\demos\benchmark\lv_demo_benchmark.c:25:10: fatal error: ../../src/display/lv_display_private.h: No such file or directory

include "../../src/display/lv_display_private.h"

Grey-Lancaster commented 8 months ago

/**

let me try that

Grey-Lancaster commented 8 months ago

IT WORKS !!! yes have to change SPIClass mySpi = SPIClass(VSPI); // critical to get touch working Thanks for that

Is this how it is supposed to look?

image

scudrunner commented 6 months ago

This would be helpful as note somewhere in the README or in the example. I had the same issues, and did not catch the difference in the examples between HSPI and VSPI

anibarro commented 5 months ago

I found the exact opposite, had to change from VSPI to HSPI to get it working on the board with micro and USB-C connectors

TheNitek commented 4 months ago

LVGL examples are using VSPI now, so this is fixed

Patsjemoe commented 3 months ago

Hi, in which file is this ?

dolfelt commented 1 week ago

I am trying to get this example to work, but the display just a bunch of scan lines. It looks like it's also trying to display it vertical instead of horizontal. Any thoughts on how to fix that?