rzeldent / esp32-smartdisplay-demo

Demo project for esp32-smartdisplay
50 stars 19 forks source link

Touch not working on esp32-8048S043C #27

Open yaconsult opened 1 month ago

yaconsult commented 1 month ago

First of all, thank you for making these wonderful repos available for people who want to learn how to use these cheap boards with PlatformIO!

I am new to all this stuff, so I started with this demo repo. I have an esp32-8048S043C, so I uncommented that line in platformio.ini and the program builds, uploads and runs, but touch does not work.

I found a closed issue with discussion about a similar problem someone had, and the recommendation was to switch to the development branch, so I tried switching to that and in the lower-left corner of PlatformIO, it does say "develop*" for the branch. I did a clean, build, and upload, but I get the same result. The program runs and the screen is being updated, but neither "Add 1", nor "Rotate" buttons do anything.

I know that the touch hardware is good because I made an image of the demo program it ships with and when I flash that image, the touch display works in the LVGL demo it runs. I can scroll and swipe between screens as expected.

As a newbie, I could very well be doing something wrong or missing some critical point. Please let me know if I missed something or if you need any additional information.

Thank you!

yaconsult commented 1 month ago

I deleted everything and tried again today by cloning recursively and switching to development branch as follows:

1016 rm -fr esp32-smartdisplay-demo/ 1017 git clone --recurse-submodules https://github.com/rzeldent/esp32-smartdisplay-demo 1018 cd esp32-smartdisplay-demo/ 1019 git switch develop 1020 git submodule update

I noticed the following errors during the build, but I don't know if they are related to touch not working on my 4.3-inch capacitive display board using: default_envs = esp32-8048S043C in platformio.ini.

src/ui/ui.c: In function 'ui_event_Rotate': src/ui/ui.c:46:16: warning: unused variable 'target' [-Wunused-variable] lv_obj_t target = lv_event_get_target(e); ^~ src/ui/ui.c: In function 'ui_event_btnCount': src/ui/ui.c:54:16: warning: unused variable 'target' [-Wunused-variable] lv_obj_t target = lv_event_get_target(e); ^~

/home/me/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c: In function 'uartSetPins': /home/me/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:153:9: warning: 'return' with no value, in function returning non-void return; ^~ /home/me/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:149:6: note: declared here bool uartSetPins(uint8_t uart_num, int8_t rxPin, int8_t txPin, int8_t ctsPin, int8_t rtsPin) ^~~

Thanks!

rzeldent commented 1 month ago

Hi Yaconsult,

Those are warnings, not errors. These are generated because of the (too) strict warning checks... -Wall Good to take a look at them but you can safely ignore them...

yaconsult commented 1 month ago

OK, I see what you mean about them only being warnings, but touch is still not working on this particular CYD 8048S043C. There are no responses to touches anywhere on the screen when running the demo. It is not interactive at all. The refresh rate is being updated, so the display code is fine, but no input. 8-(

Input DOES work with the LVGL demo that the board ships with, so the hardware is good.

Thank you!

rzeldent commented 4 weeks ago

Are you using the latest version? With the submodules also at the latest version? I can not reproduce this; See video below just compiled, develop version...

https://github.com/rzeldent/esp32-smartdisplay-demo/assets/7620231/5960360c-f9fd-44d7-a2d9-6fb423dfbf29

](url)