Connecting a ST7735 TFT display to a ESP8266
- A 1.44" color TFT with a ST7735 controller with a resolution of 128x128 pixels. I ordered it on Ebay for about 3 Euro.
This module uses 3.3V on all connections. Since the ESP8266 delivers 3.3V on its GPIO ports, it is ideal for connecting it to the microcontroller. If you want to use the module with an Arduino, you must use a level shifter module to convert 5V to 3.3V for the GPIO ports.
- An ESP12E Devkit from Banggood.com for about 9 Euro. It uses the ESP8266 Chip and a CH340 Controller to make a serial connection to the PC via USB. You can download the windows driver for the CH340 on http://www.doit.am.
I wanted to use the Arduino IDE, since I am more familiar with it than the Nodemcu Development Environment. To use the Arduino IDE with the ESP8266, you have to download some code from Github: https://github.com/esp8266/Arduino. These guys have done an incredible job for supporting the ESP8266 in the Arduino IDE. You can find detailed instructions on how to install the core libraries on Github.
In the Arduino IDE you now have to choose the correct board type in the Tools menu. In my case it looks like this:
Next, I had to choose a library for the TFT controller ST7735 that also supports the ESP8266. I decided to use the library from Adafruit. At the time of writing, altough you can install the library from the IDE, the version available there (1.0.1) does not compile on the ESP8266. To continue, close the Arduino IDE. Then go to Github
, click on Download ZIP and extract the contents of the ZIP file to a folder called Adafruit-ST7735-Library in the libraries folder of your Arduino IDE installation. In my case this is My Documents\Arduiono\libraries\Adafruit-ST7735-Library. This folder now looks like this:
Make sure you did not create another subfolder within this folder! At the time of writing, the available version on Github was version 1.0.4.
Connecting the TFT to the ESP8266
The following connections were made: