TFT SPI Display

To make the SPI display compatible to the usual Arduino ESP libraries, it is connected like this:

DisplayESP
LED3v3
SCKD5 (SPI CLK)
SDA SDI MOSID7 (SPI MOSI)
A0 DC RSD4
RESETD3
CSD2
GNDGND
VCC3v3

D2, D3 and D4 are defined in the software and can be changed.

Addressing the display in the firmware

Board manager URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json\ Board: NodeMCU 1.0 (ESP-12E Module)

to install:

include:

#include "Adafruit_GFX.h" // include Adafruit graphics library
#include "Adafruit_ILI9341.h" // include Adafruit ILI9341 TFT library

initialization:

#define TFT_CS D2
#define TFT_RST D3
#define TFT_DC D4
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);

Start:

tft.begin();
tft.setRotation(3);
tft.fillScreen(ILI9341_BLACK);
printText(0,0, "Test Text");