I recently got a adafruit tftAdafruit TFT screen and an ESP-32 development kit. I was trying to interface these two the pinconnectionspin connections I used areas follows:
#TFT-------------------ESP-32
#3V3-------------------Vcc #Gnd------------------- Gnd #MOSI------------------GPIO19 #SCK------------------GPIO18 #CS-------------------GPIO5 #D/C------------------GPIO16 #RST------------------GPIO 17
TFT | ESP-32 ------+---------- 3V3 | Vcc Gnd | Gnd MOSI | GPIO19 SCK | GPIO18 CS | GPIO5 D/C | GPIO16 RST | GPIO 17 The SPI library used was the one that comes while installing arduinoArduino support for ESP-32.
The code compiles and uploads without any error/ warning but the TFT screen does not show any response (except powering up). This
This is the code I used for testing :
//#include <Adafruit_ST7735.h> #include<Adafruit_ILI9341.h> #include <Adafruit_GFX.h> #include "SPI.h" #define TFT_CS 5 #define TFT_RST 17 #define TFT_DC 16 // Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC //Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); // If using the breakout, change pins as desired Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS ,TFT_DC, 23, 18, TFT_RST); void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println("In the setup."); //tft.initR(INITR_BLACKTAB); unsigned long t=micros(); tft.fillScreen(ILI9341_RED); Serial.println(micros()-t); } void loop() { // put your main code here, to run repeatedly: } //#include <Adafruit_ST7735.h> #include<Adafruit_ILI9341.h> #include <Adafruit_GFX.h> #include "SPI.h" #define TFT_CS 5 #define TFT_RST 17 #define TFT_DC 16 // Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC //Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); // If using the breakout, change pins as desired Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS ,TFT_DC, 23, 18, TFT_RST); void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println("In the setup."); //tft.initR(INITR_BLACKTAB); unsigned long t=micros(); tft.fillScreen(ILI9341_RED); Serial.println(micros()-t); } void loop() { // put your main code here, to run repeatedly: } The code compiles and uploads without any error/ warningwarning but the TFT screen does not show any response (except powering up). Thanks in advance for the help.
NOTE : The library works fine with arduino megaArduino Mega and tftTFT display.