Using touch with Sunton esp32-2432s028 (ILI9341, ESP32-WROOM-32, XPT2046) #2677
-
I am trying to get the wifi marauder to work with this board: esp32-2432s028. (https://www.makerfabs.com/sunton-esp32-2-8-inch-tft-with-touch.html) and everything works except touch. After lots of debugging I tried using the Test_Touch_Controller sketch using Arduino IDE and I only see zeroes as x,y,z. No response at all when using touch. I have tried the LovyanGFX library and that works. So after some heavy searching I found a fork (https://github.com/Seeed-Studio/Seeed_Arduino_LCD) of this repo where they have added support to specify MISO, MOSI etc for the touch. I have trying to use that fork instead but I get lots of errors (I will continue to work on that). Do anyone understand why this repository does not register touch using this board while other libraries do? Can the reason be that the MISO, MOSI etc is not specified here? User_Setup.h #define USE_HSPI_PORT Serial output: |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 4 replies
-
Maybe you want to try using a pins.h declaration file, like so: https://github.com/Xinyuan-LilyGO/T-HMI/blob/master/examples/touch_calibration/pins.h |
Beta Was this translation helpful? Give feedback.
-
The TFT_eSPI library expects the touch controller and TFT to be on the same SPI bus. The sunton board connects the touch controller to diferent pins:
The TFT_eSPI library can still be used but you will need an independant library for the touch functions. There are quite a few libraries that support the XPT2046 touch controller, such as this one: There are no plans to change the TFT_eSPI library to support different touch controllers or different I/O pins. In the longer term the plan is to deprecate/remove touch functionality and create seperate librarys so that other touch chips can be supported easily (capacitance FTxxxx controlers etc.) |
Beta Was this translation helpful? Give feedback.
-
There is an example in the linked library that should help. |
Beta Was this translation helpful? Give feedback.
-
Sorry for necro-bumping Hi @Atmannen , did you got any further on this project? I have the same board but i'm having a hard time to get it working would you have a working fork of marauder on this board? |
Beta Was this translation helpful? Give feedback.
-
I use the exact same Sunton board and use the (https://github.com/achillhasler/TFT_eTouch) library to handle the touch functions. Works like a champ and in some respects, a little easier to use than the touch functions in TFT_eSPI. Plenty of examples, but no discussions section. |
Beta Was this translation helpful? Give feedback.
-
Hello, did you manage to run the marauder on esp32-2432s028? |
Beta Was this translation helpful? Give feedback.
-
Hello Stranded Alien here, no I did not try yet. But it is a very good idea. If have time I will try.--Am 13.02.25, 18:39 schrieb Crazy-Child ***@***.***>:
Hello, did you manage to run the marauder on esp32-2432s028?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
The TFT_eSPI library expects the touch controller and TFT to be on the same SPI bus. The sunton board connects the touch controller to diferent pins:
The TFT_eSPI library can still be used but you will need an independant library for the touch functions. There are quite a few libraries that support the XPT2046 touch controller, such as this one:
https://github.com/achillhasler/TFT_eTouch
There are no plans to change the TFT_eSPI library to support differ…