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.
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.
The screen
The board, then shapes, colors and animation.
| Lesson | Time | What students do |
|---|---|---|
| The board tourMeet 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 |
|
| Drawing shapesA 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 |
|
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".
Words and touch
Fonts and text, and where a finger lands.
| Lesson | Time | What students do |
|---|---|---|
| Text and fontsWords 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 |
|
| Touch pointsWhere 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 |
|
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".
Real apps
Buttons that do things, and a clock that asks the internet.
| Lesson | Time | What students do |
|---|---|---|
| Buttons on screenTurn 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 |
|
| A WiFi clockJoin 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 |
|
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".
Project
A touch remote: a space mission panel.
| Lesson | Time | What students do |
|---|---|---|
| Project: a space mission panelA 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 |
|
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".
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.