Touch Interrupt - showing gif/png Files - ESP32 2nd Task #3484
Unanswered
JoJos1220
asked this question in
Q&A - Touch
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a general question in "how to implement touch on ESP32 2nd core":
My Project currently consists of two main purposes: Showing .png & .gif Images on a TFT Libary in an loop - its something like an endless showing of images delivered by SD-card. So far so good - this part is working.
Now, for some detail Information of the screen, i wanted to implement a small-light-size touch interaction where detail informations are provided by the image, WiFi Setup can be changed and so on.
I did some research, and I think the best way to implement something like that is, to use the second core of the ESP32, use the Interrupt pin and contionious pull the Pin in a loop if there was an interrupt or not and then call the tft.getTouchRaw() function for the coordinates.
The Implementation like that actually is working but is not running stable. I got some crashes due to interrupt by Multitasking issues and both tasks try to access the tft lib (for sure....drawing images and getting coords at the same time....)
I want to block now the access to the TFT display with an semaphore() but it is not working in a good way (starting app, once running good, then both cores are blocking but semaphore take/give is directly calling after tft interaction)
Does somebody have an application like this and can share me an code snipped in how the touch can be readed by a "good-filled" parallel action with showing gifs and/or png files? Is there some easier way to implement this behaviour?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions