Update on 15/8/18: The TFT_eSPI library can now be loaded via the library manager in the Arduino IDE.
Update on 11/3/18: The libray now supports 8 bit parallel TFTs with an ESP32. For example UNO style TFT displays made by mcufriend.
UPDATE on 22/2/17: The TFT_ILI9341_ESP library has now morphed into a new library that supports multiple display drivers. The new library TFT_eSPI can be found here. See also post #63. The library currently supports the ILI9341, ILI9163, ST7735 and S6D02A1 based TFT displays with SPI interface.
I have ported my TFT_ILI9341 graphics library to the NodeMCU. A copy can be found on GitHub.
The library support use of the hardware SPI interface, example connections for a NodeMCU board with a 2.2" 320x240 display are:
Display SDO/MISO to NodeMCU pin D6 Display LED to NodeMCU pin VIN (5V) Display SCK to NodeMCU pin D5 Display SDI/MOSI to NodeMCU pin D7 Display DC to NodeMCU pin D3 Display RESET to NodeMCU pin D4 Display CS to NodeMCU pin D8 Display GND to NodeMCU pin GND (0V) Display VCC to NodeMCU pin VIN (5V)
Performance is quite reasonable with a 40MHz SPI clock when running the graphicstest sketch:
Benchmark Time (microseconds) Screen fill 161973 Text 49593 Lines 320578 Horiz/Vert Lines 17827 Rectangles (outline) 13985 Rectangles (filled) 333103 Circles (filled) 187493 Circles (outline) 210565 Triangles (outline) 70579 Triangles (filled) 212988 Rounded rects (outline) 88425 Rounded rects (filled) 429151 Done!
The library is based on (but does not use) the Adafruit_GFX library. Extra fonts have been added that are encoded for fast rendering. Text and numbers can also be right/left/centre justified to assist in creating neat displays.
Examples are included which show how to use the features.
Report any bugs here.