Source: https://mokxi.com/teachers/plans/cyd-touch-apps
Updated: 2026-11-19

Lesson plan

# Touch apps on the Cheap Yellow Display lesson plan

Make touch-screen gadgets on the Cheap Yellow Display, an ESP32 with a screen built in: shapes, text and fonts, touch points, buttons on screen, a WiFi clock, and a space mission panel.

4 chapters, 7 lessons, about 5 hours, on the Cheap Yellow Display (ESP32-2432S028R). Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- The board, then shapes, colors and animation.
- Fonts and text, and where a finger lands.
- Buttons that do things, and a clock that asks the internet.
- A touch remote: a space mission panel.

### Materials for the whole unit

- Cheap Yellow Display (ESP32-2432S028R)

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h 20 min

## The screen

The board, then shapes, colors and animation.

Lesson | Time | What students do

The board tour Meet the Cheap Yellow Display: an ESP32 glued to a touch screen. Where the screen, the touch film, the RGB LED and the free pins are wired, and a first hello on the screen. | 40 min

- Run it: a computer with a screen
- The screen
- The touch film
- The RGB LED, lit LOW
- Say your name
- What else is on it

Drawing shapes A night launch in pixels: coordinates where y grows down, lines, rectangles, circles and triangles, colors as RGB565 numbers, and a satellite animated by erasing and redrawing. | 40 min

- Run it: a night launch
- Where is (0, 0)?
- Colors are numbers
- Animate by erasing
- A red-hot flame
- Draw your own

### Materials

- Cheap Yellow Display (ESP32-2432S028R)

### Check for understanding

Each student finishes "Drawing shapes" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Draw your own".

Chapter 2. About 1 h 20 min

## Words and touch

Fonts and text, and where a finger lands.

Lesson | Time | What students do

Text and fonts Words and numbers on the screen: TFT_eSPI’s numbered fonts measured in pixels, the text datum that anchors a string, scaling, and a score that counts up without flicker. | 40 min

- Run it: four fonts
- Bigger fonts
- The datum
- A score with no flicker
- Twice the size
- Lay out a screen

Touch points Where did the finger land? Read the XPT2046 touch chip, see its raw numbers, map them to pixels, draw a crosshair, and find out what calibration is by getting it wrong. | 40 min

- Run it: touch the screen
- Touch near the top left
- Lift
- Raw numbers and calibration
- Get calibration wrong
- Resistive or capacitive

### Materials

- Cheap Yellow Display (ESP32-2432S028R)

### Check for understanding

Each student finishes "Touch points" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Resistive or capacitive".

Chapter 3. About 1 h 20 min

## Real apps

Buttons that do things, and a clock that asks the internet.

Lesson | Time | What students do

Buttons on screen Turn rectangles into buttons: a struct for each one, a hit test, a pressed look, and an action. Three buttons that light the board’s RGB LED red, green or blue. | 40 min

- Run it: three buttons
- Press GREEN
- The LED follows
- A miss
- Rename a button
- Good buttons

A WiFi clock Join WiFi, ask a time server for the time with NTP, add a time zone, and show it in seven-segment digits. The network is simulated, and the lesson says exactly what that means. | 40 min

- Run it: joining WiFi
- Connected
- Ask a time server
- Big digits
- Your time zone
- Daylight saving

### Materials

- Cheap Yellow Display (ESP32-2432S028R)

### Check for understanding

Each student finishes "A WiFi clock" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Daylight saving".

Chapter 4. About 55 min

## Project

A touch remote: a space mission panel.

Lesson | Time | What students do

Project: a space mission panel A touch remote for a rocket: ARM, LAUNCH and ABORT buttons drive a safe, armed, countdown and liftoff state machine, light the LED, and send every command over serial. | 55 min

- Run it: mission control
- Safe
- Try to launch
- Arm it
- Countdown and liftoff
- Abort
- A longer countdown
- Ship it

### Materials

- Cheap Yellow Display (ESP32-2432S028R)

### Check for understanding

Each student finishes "Project: a space mission panel" on their own, without opening the hints. The simulator checks 8 of its 8 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Ship it".

Your class

## Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
