Source: https://mokxi.com/teachers/plans/build-handheld
Updated: 2026-11-11

Lesson plan

# Build a handheld game console lesson plan

Wire a color screen, buttons and sound to an ESP32-C3, one working step at a time, and finish with three games you can play.

3 chapters, 7 lessons, about 6 hours, on the ESP32-C3-DevKitM-1. 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

- Wire the panel and the pad, and see every press on the glass.
- Draw a sprite, move it, and run a steady game loop.
- Add music, a menu and a battery gauge, then play three games.

### Materials for the whole unit

- Battery: AA, coin cell, LiPo
- ESP32-C3-DevKitM-1
- Full-size breadboard
- Game console buttons
- Piezo speaker
- Pushbutton x 2
- Resistor x 2
- TFT display, 240x320

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 40 min

## Screen and buttons

Wire the panel and the pad, and see every press on the glass.

Lesson | Time | What students do

Light up the screen Wire a 2.4 inch color TFT to an ESP32-C3 on four wires, wake it up, and paint your first title and color bars. | 50 min

- Four wires and a screen
- Run it
- Watch the clock wire
- Make it yours

Add the D-pad and buttons Six buttons to ground, read with the chip's own pull-ups: see every press on the screen and in the serial monitor. | 50 min

- A switch to ground
- Press A
- Watch the pin go low
- Every direction

### Materials

- ESP32-C3-DevKitM-1
- Full-size breadboard
- Game console buttons
- TFT display, 240x320

### Check for understanding

Each student finishes "Add the D-pad and buttons" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

Chapter 2. About 1 h 40 min

## Make it a game

Draw a sprite, move it, and run a steady game loop.

Lesson | Time | What students do

Draw a sprite and move it Turn a little text picture into pixel art, then walk it around the screen by erasing only the strip it leaves behind. | 50 min

- A picture made of letters
- Walk right
- Why only the strip
- Draw your own hero

Write a game loop Read, update, draw, wait: a catch game at a steady forty frames a second, and how a loop keeps its own beat. | 50 min

- Three jobs, forever
- A steady beat
- Catch one
- Speed it up

### Materials

- ESP32-C3-DevKitM-1
- Full-size breadboard
- Game console buttons
- TFT display, 240x320

### Check for understanding

Each student finishes "Write a game loop" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

Chapter 3. About 2 h 30 min

## Make it a console

Add music, a menu and a battery gauge, then play three games.

Lesson | Time | What students do

Add chiptune sound A piezo on one pin plays a looping tune from tone(), and a jump sound on A cuts in without ever stopping the loop. | 50 min

- A piezo and one pin
- Music that never stops the game
- Jump
- Turn it off

Build the game menu Add Start and Select, then a menu that opens a game and always finds its way back: the screens every console is made of. | 50 min

- Start and Select
- Screens and a variable
- Open a game
- Find your way back

The finished console Three real games, music, a pause button and a battery gauge: everything from the path in one handheld you can play. | 50 min

- A battery gauge
- Run the battery down
- Play Blocks
- Runner, Snake, and pause

### Materials

- Battery: AA, coin cell, LiPo
- ESP32-C3-DevKitM-1
- Full-size breadboard
- Game console buttons
- Piezo speaker
- Pushbutton x 2
- Resistor x 2
- TFT display, 240x320

### Check for understanding

Each student finishes "The finished console" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

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

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.
