Problem with ESP32 and ili9488 capacitive-GT911 touch screen #2347
-
Dear Bodmer, For the moment, I managed to make the screen and SD work, but I had no success with the touch control. I´ve tried different wiring diagrams but no way. Could you please share the complete and correct TFT, SD and touch wiring I should use, according to my TFT screen and ESP32 board. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 23 replies
-
The TFT_eSPI library does not not incorporate that touch controller but it could be used with an independant library. A quick Google came up with this video: Although that is without a screen the principles are the same. And this further link from the video which has test sketches and a good explanation of how to connect up and get it working: This library can be used to add touch support for the GT911: |
Beta Was this translation helpful? Give feedback.
-
@RSanchez888 thank you very much for your input here. I got your script to run (even there seem to be some characters lost) However I wonder why you did not use Bodmers library for the display part. That is possible and so you can keep all the good work from this library To achieve that you need to remove the calibration from Bodmers scripts and add all the necessary stuff from the TAMCTec library. Rotation needs to be set like this: TFT - Touch: However "NORMAL" did not work for me. Your pinning works with this ... TFT: Touch: Make sure you adjust width and height to the orientation: Of course you need to take care of reading the touch values yourself wherever needed regards |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
To whom may be interested. I already manage to make the capacitive ILI9488 work on a DOIT ESP32 devkit v1; the code below is an example based on TFT_eSPI, TJpg_Decoder and TAMC_GT911 libraries. All you need to do is to insert in the code the filenames of the jpg images (480x320) you want to show on the TFT from the SD card. Each image will appear on the TFT after each touch; the only issue I have is that it seems that single touches are detected as double touches, I do not know why. Any help or comments are welcome, thanks! Wiring: Code #if !defined(ESP32) #define FS_NO_GLOBALS #ifdef ESP32 #define BLACK 0x0000 #define TOUCH_SDA 21 #define SD_CS 5 TAMC_GT911 tp = TAMC_GT911(TOUCH_SDA, TOUCH_SCL, TOUCH_INT, TOUCH_RST, TOUCH_WIDTH, TOUCH_HEIGHT); TFT_eSPI tft = TFT_eSPI(); int touchCounter = 0; // This next function will be called during decoding of the jpeg file to // This function will clip the image block rendering automatically at the TFT boundaries // This might work instead if you adapt the sketch to use the Adafruit_GFX library // Return 1 to decode next block void setup() digitalWrite(22, HIGH); // Touch controller chip select (if used) tft.begin(); tp.begin(); if(!SD.begin()){ uint8_t cardType = SD.cardType(); if(cardType == CARD_NONE){
TJpgDec.setJpgScale(1); void loop(void) if(tp.isTouched){
} } |
Beta Was this translation helpful? Give feedback.
To whom may be interested. I already manage to make the capacitive ILI9488 work on a DOIT ESP32 devkit v1; the code below is an example based on TFT_eSPI, TJpg_Decoder and TAMC_GT911 libraries. All you need to do is to insert in the code the filenames of the jpg images (480x320) you want to show on the TFT from the SD card. Each image will appear on the TFT after each touch; the only issue I have is that it seems that single touches are detected as double touches, I do not know why. Any help or comments are welcome, thanks!
Wiring:
TFT Pin number on ESP32
Vcc 3.3V
GND GND
CS 14
RST 16
D/C 17
MOSI 23
SCK 18
LED 3.3V
MISO not connected
TOUCH
Int 2
SDA 21
RST 15
SCL 22
SDcard reader
CS 5
MOS…