-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XPT2046 Touch screen control on other SPI bus #471
Comments
Need more information to understand what plugins you're using etc. For example, the TFT-eSPI plugin uses the libraries internal interrogator, and therefore would be configured within that library. So does the BSP touch plugin. The only other plugin is the ArduinoLibrary based plugin, I am assuming that. However, someone will need to determine how the plugin needs to change in order to pass in other than the default bus, is it in the variable definition, here in the plugin: |
Using the XPT2046 and the example code that works with the library is SPIClass touchscreenSPI = SPIClass(VSPI); |
If you add GFX_Library_for_Arduino for the ESP devices as selection it will simplify things as many displays are preconfigured for use . |
Hi, I've just been trying the same sort of thing e.g. trying the get tcMenu to run on an ESP32 2432S028R Cheap Yellow Display (CYD) using the XPT2046 Touch screen SPI (VSPI) controller. The GPIO pins are as detailed by paulvk2 above. I've tried all the related examples but I've failed to get any tcMenu input working from the touch screen of the CYD. |
A successful workaround for (this) issue #471 is in Github repo https://github.com/AtmosphEng/TcmTouch-XPT2046.git. tcMenuDesigner is used to generate the XPT2046 touchscreen as per normal and the workaround code is found by searching for the tag: WORKAROUND_TCMENU_WITH_ESP32_CYD. Basically the ESP32_CYD uses a different SPI for the resistive touchscreen on SPI2 (VSPI). The io pin set for VSPI is put in *_main.cpp and is used to create mySPI. the tcMenuDesigner generated file tcMenuAdaTouchDriver.h is modded to access mySPI via an extern. Iin its init(), theTouchDevice(); is then modded to theTouchDevice(mySpi);. |
With the ESP32-2432S028 and other similar displays the touch control chip is on the second buss of the ESP32 but tcMenu has no options when the TFT and touch are on different bus.
The text was updated successfully, but these errors were encountered: