Source: https://mokxi.com/learn/path/tft-ui-and-touch
Updated: 2026-11-20

All paths

# Color TFT screens and touch UI

Color screens on the ESP32: SPI panels and RGB565, TFT_eSPI with fonts and smooth gauges, resistive and capacitive touch, screens and a tab bar, and a spaceship life support thermostat for the boss.

ESP32 DevKit V1 Free 7 lessons 6 h 4 chapters 2,242 XP Embedded engineering · Intermediate +150 XP

0 of 7 done

Start the course free SPI panels: two screens, one bus Lesson plan for teachers

What you will build

## 3 projects, built step by step

7 lessons in 4 chapters, about 6 hours on a simulated ESP32 DevKit V1. Free, in your browser, every step checked by the simulator.

Chapter 1 project

### TFT_eSPI setup, colors and fonts

TFT_eSPI on a 2.8 inch ILI9341: the setup defines, rotation, color565(), the numbered fonts, centered text with a datum, and a mission clock that redraws without flicker.
Open it in the simulator

Chapter 2 project

### Resistive touch

The XPT2046 on the same SPI bus: raw 12-bit readings and pressure, a calibration that turns them into pixels, a mirrored axis to fix, and three buttons for the cabin lights.
Open it in the simulator

Chapter 3 project

### Screen navigation

A spaceship console with three screens and a tab bar: one state variable, screens drawn only when they change, and touches that mean something only on their own screen.
Open it in the simulator

The map

## Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

## Pixels over SPI

Panels on one bus, 16-bit color, and TFT_eSPI.

Open 218 XP

### SPI panels: two screens, one bus

An ST7789 and a round GC9A01 on one SPI bus: clock, data, chip select and DC, RGB565 color in 16 bits, and what a full-screen fill costs.

0 of 6 steps

Start What is in it

Project Locked 436 XP

### TFT_eSPI setup, colors and fonts

TFT_eSPI on a 2.8 inch ILI9341: the setup defines, rotation, color565(), the numbered fonts, centered text with a datum, and a mission clock that redraws without flicker.

0 of 6 steps

4 questions, graded as you go.

Chapter 2

## Widgets and touch

Gauges and buttons, then a resistive panel to press them.

Locked 218 XP

### Buttons and gauges

A rover fuel gauge: a smooth arc and a bar from one number, a color that warns below a limit, a drawn button, and the rule of redrawing only what changed.

0 of 6 steps

Project Locked 436 XP

### Resistive touch

The XPT2046 on the same SPI bus: raw 12-bit readings and pressure, a calibration that turns them into pixels, a mirrored axis to fix, and three buttons for the cabin lights.

0 of 6 steps

4 questions, graded as you go.

Chapter 3

## Capacitive touch and screens

Touch in pixels, and an app with more than one screen.

Locked 218 XP

### Capacitive touch

An FT6206 on I2C: no pressure and no calibration, touch points already in pixels in the panel's own portrait frame, turned around for landscape, and a landing pad to hit.

0 of 6 steps

Project Locked 436 XP

### Screen navigation

A spaceship console with three screens and a tab bar: one state variable, screens drawn only when they change, and touches that mean something only on their own screen.

0 of 6 steps

3 questions, graded as you go.

Chapter 4

## Boss project

A life support thermostat for a spaceship cabin.

Locked 280 XP

### Boss: a life support thermostat

A spaceship cabin thermostat: a TMP36 in big digits, a set point on touch buttons, heating and cooling with hysteresis so it never chatters, and an alarm outside the safe range.

0 of 8 steps

3 questions, graded as you go.

Syllabus

## Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

### Pixels over SPI

- SPI panels: two screens, one bus An ST7789 and a round GC9A01 on one SPI bus: clock, data, chip select and DC, RGB565 color in 16 bits, and what a full-screen fill costs.
- TFT_eSPI setup, colors and fonts TFT_eSPI on a 2.8 inch ILI9341: the setup defines, rotation, color565(), the numbered fonts, centered text with a datum, and a mission clock that redraws without flicker.

Chapter 2

### Widgets and touch

- Buttons and gauges A rover fuel gauge: a smooth arc and a bar from one number, a color that warns below a limit, a drawn button, and the rule of redrawing only what changed.
- Resistive touch The XPT2046 on the same SPI bus: raw 12-bit readings and pressure, a calibration that turns them into pixels, a mirrored axis to fix, and three buttons for the cabin lights.

Chapter 3

### Capacitive touch and screens

- Capacitive touch An FT6206 on I2C: no pressure and no calibration, touch points already in pixels in the panel's own portrait frame, turned around for landscape, and a landing pad to hit.
- Screen navigation A spaceship console with three screens and a tab bar: one state variable, screens drawn only when they change, and touches that mean something only on their own screen.

Chapter 4

### Boss project

- Boss: a life support thermostat A spaceship cabin thermostat: a TMP36 in big digits, a set point on touch buttons, heating and cooling with hysteresis so it never chatters, and an alarm outside the safe range.

Kits

## Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

### Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kit

Questions

## About Color TFT screens and touch UI

Is Color TFT screens and touch UI free?

Yes. All 7 lessons of Color TFT screens and touch UI are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real ESP32 DevKit V1?

No. Every lesson runs on a simulated ESP32 DevKit V1 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does Color TFT screens and touch UI take?

About 6 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: TFT_eSPI setup, colors and fonts, Resistive touch and Screen navigation.

Where do I start?

With "SPI panels: two screens, one bus", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.
