Lesson objectives
The purpose of this lesson is to introduce you to TFT screens, explain how they work, and how they communicate with microcontrollers such as the ESP32. You will learn the key concepts behind TFT display technology, its benefits for IoT applications, and how it can be used to visualize sensor data in real time.
Introduction
As we continue with our IoT project, the next step is to present sensor data in a user-friendly way. One of the most common methods of visualizing this data is using a TFT (Thin Film Transistor) screen. TFT screens are small, colorful, and capable of displaying dynamic data in real time, making them perfect for compact IoT projects.
What is a TFT screen?
A TFT screen is a type of liquid crystal display (LCD)that uses thin-film transistor technology to improve image quality. Unlike older passive-matrix LCDs, which have slower refresh rates and lower contrast, TFT screens provide sharper images and faster updates, making them ideal for displaying real-time data.
Key properties of TFT screens
-
Color capability: TFT screens can display full-color images and usually support 65,000 colors or more. This is an advantage when designing visually appealing interfaces.
-
Fast refresh rate: TFT screens refresh quickly, allowing changing sensor data to be displayed in real time without delays.
-
Resolution: The screen resolution is 135x240 pixels, providing a suitable area for displaying text and basic graphical data.
-
Compact size: These screens come in various small sizes (1.4", 1.8", 2.0", etc.), making them ideal for portable or space-constrained IoT devices.
-
Touchscreen option: Some TFT screens also have touch functionality, adding another dimension of interactivity.
For our project, we use a 1.14" TFT screenintegrated into the ESP32 TTGO T-Display development board. This type of screen provides a compact and clean interface for visualizing real-time sensor data.
List of required components:
![]() |
AHT10 high-precision temperature and humidity sensor |
![]() |
TTGO T-Display ESP32 16MB with WiFi, Bluetooth and 1.1" color LCD screen |
![]() |
Dupont cables, 40 pcs |
How do TFT screens communicate with microcontrollers?
TFT screens communicate with microcontrollers via a protocol called SPI (Serial Peripheral Interface). SPI is a fast and simple communication protocol used to transfer data between the microcontroller and external devices.
SPI communication with TFT screens:
-
MOSI (Master Out Slave In): This pin sends data from the ESP32 to the screen.
-
MISO (Master In Slave Out): This pin sends data from the screen back to the ESP32 (rarely used in display communication).
-
SCK (Serial Clock): Synchronizes data transfer between the ESP32 and the TFT screen.
-
CS (Chip Select): Indicates which device on the SPI bus is active for communication.
For our project, we use the TFT_eSPI library, which simplifies the code for communicating with the TFT screen. The library handles all low-level operations so we can focus on formatting and displaying data.
Benefits of TFT screens in IoT projects
-
Improved visual presentation: TFT screens allow IoT devices to present data visually, in color, and with different levels of detail.
-
Real-time updates: Sensor readings can be updated immediately on the screen, giving users real-time feedback.
-
Customization: With TFT screens, you can control the font, colors, and data layout to design a custom interface.
Summary
In this lesson, we learned about TFT screens and their importance in IoT projects. We explored how they work, how they communicate with microcontrollers, and why we use a 1.14" TFT screen on the TTGO T-Display board for our project.
By understanding how TFT screens work and their role in visualizing real-time data, you can create more interactive and user-friendly IoT systems.
In upcoming lessons, we will dive into the practical work of coding TFT screens, updating them with sensor data, and improving their visual output to provide a better user experience.
About the measurements: The station in this series measures temperature and relative humidity using the AHT10. These are indoor climate readings, not direct measurements of CO2, VOCs, or particles. The series name “air quality monitoring” should be understood with this limitation.


