SPI should support multiple devices (sharing MOSI, MISO, SCK) - made possible by each having a unique CS.
PE - I've been trying to get a SPI TFT and an I2C-based touchscreen to cooperate in ESP32 situation.
Howbeit, I have the TFT on VSPI and a couple of thermocouples on the HSPI - and that goes OK.
For people who are reading this and have the same problem. I managed to change the library so it switches to the other MISO, MOSI, SCK pins and back when the library is accessing the touchscreen.
Thanks for sharing this information, 2 day' s struggeling with this board.
I' m quit a newbie for this technics, but want to learn.
Do you recommend a sketch to start with, to have buttons etc?
I installed your TFT_eSPI library(renamed to TFT_eSPI befoer import, installed it trough Arduino IDE, install zip file
is this the right or am i missing something?
I adjust the user_setup.h file as mentioned conform my lcm drawing, but no touch at all, other test sketches like the matrix sketch is no longer working.
Yes, screen with TFT_eSPI works, but no touchscreen.
With the your librarie its not working, i tried with original library the matrix sketch, does work.
With your library not.
I already adjusted the pin assignment, as you suggested.
It's the right way to remove the library and import your zip into the ide?
With special TFT_eSPI
Proposed ports modified
Then upload from Test_Touch_Controller.ino
Comes with error missing TFT_driver ILI9341 driver
Copied from original TFT_eSPI
Upload again, then missing touch.h file in extensions
Also copied from original
Then upload, no errors
Then serial monitor: x:8191 Y:8191 z:4095
setup_user.h modified to ST7796 driver
Same output
In setup_user.h #define TFT_RST 12 modified #define TFT_RST -1
Then output x:0 y:0 z:4095
With sketch demo_3D_cube white screen
Tried different drivers, no success
Then command #define USE_SEPERATE_TOUCH_BUS out, then sketch will work with your Library.
Next test:
In the user_setup.h the line //#define TFT_MISO 12 is commanded out
Then upload the following sketch: