2.8 TFT SPI with Touch

error105
Posts: 5
Joined: Wed Mar 18, 2020 7:25 am

2.8 TFT SPI with Touch

Postby error105 » Wed Mar 18, 2020 8:41 am

Hi, i just buy 2.8 TFT screen that have touch screen.

I use SPI, but im dont know which library i should use for my touch screen and where i shoul connect pins.

Code: Select all

#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
Adafruit_ILI9341 tft = Adafruit_ILI9341(2, 4, 21, 18, 15);


void setup() {

  Serial.begin(115200);
  Serial.println("ILI9341 Test!"); 
 
  tft.begin();
  tft.fillScreen(ILI9341_BLACK);
  
}


void loop() {
  


}
Image

pipi61
Posts: 58
Joined: Fri Dec 23, 2016 10:58 pm

Re: 2.8 TFT SPI with Touch

Postby pipi61 » Wed Mar 18, 2020 10:31 am

The lcd spi pins and touch spi pins short wire
my pins, but check setting in your used library...

Code: Select all

   ESP | ILI9341 | TOUCH  |
   --------|---------|---------
   GPIO2   | DC      |        |
   GPIO17  |         |   TPCS   |
   GPIOxx  |         |   TIRQ |        none if tft espi lib
   GPIO19  | MISO    |   TDO  |
   GPIO23  | MOSI    |   TDIN |
   GPIO18  | CLK     |   TCK  |
   GPIO15  | lcdCS   |        | 
   GPIO4   | lcdrst   |        | 
   VCC3V3  |BACKL.LED|        |
   VCC3V3  | VCC     |        |
   VCC3V3  | RESET   |        |
   --------|---------|--------- 
-------
try https://github.com/Bodmer/TFT_eSPI/ library, this include touch and spi functions, and examples

error105
Posts: 5
Joined: Wed Mar 18, 2020 7:25 am

Re: 2.8 TFT SPI with Touch

Postby error105 » Wed Mar 18, 2020 12:03 pm

T_DO, T_DIN, T_CLK i dont know where i shuld wire.
T_CS to CS pin i know :)

pipi61
Posts: 58
Joined: Fri Dec 23, 2016 10:58 pm

Re: 2.8 TFT SPI with Touch

Postby pipi61 » Wed Mar 18, 2020 1:42 pm

Code: Select all

GPIO19  | MISO    |   T_DO  |
   GPIO23  | MOSI    |   T_DIN |
   GPIO18  | SCK     |   T_CLK  |
   
esp gpio19 connect to miso AND t_do ....
check your photo...

Who is online

Users browsing this forum: No registered users and 55 guests