Source: https://mokxi.com/teachers/plans/build-tetris-matrix
Updated: 2026-11-19

Lesson plan

# Build Tetris on an LED matrix lesson plan

Build a complete falling-blocks game on two 8x8 LED matrices: a field of sixteen bytes, seven pieces, quarter turns, line clears and levels.

3 chapters, 6 lessons, about 5 hours, on the Arduino Uno R3. 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

- Sixteen bytes on two matrices, and seven shapes that fall.
- Turn the pieces, clear the lines and speed it up.
- Put it all together into a game worth sharing.

### Materials for the whole unit

- Arduino Uno R3
- Buzzer
- LED matrix, 8x8 x 2
- Thumb stick

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

## The field and the pieces

Sixteen bytes on two matrices, and seven shapes that fall.

Lesson | Time | What students do

The board grid Two 8x8 LED matrices make one field 8 wide and 16 tall. Keep it as sixteen bytes, drive it over three wires, and draw on it with the joystick. | 45 min

- Sixteen bytes
- Two chips, one screen
- Flip one bit
- A full row is 255
- Bits are pictures

Pieces The seven shapes four squares can make, each a list of cells in a box. Make them fall, steer them, and stop them on the floor and on each other. | 50 min

- Seven shapes of four
- Falling is a test
- Steer it
- The wall
- Faster, and onto the stack
- Meet all seven

### Materials

- Arduino Uno R3
- Buzzer
- LED matrix, 8x8 x 2
- Thumb stick

### Check for understanding

Each student finishes "Pieces" 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: "Meet all seven".

Chapter 2. About 2 h 25 min

## The rules of the game

Turn the pieces, clear the lines and speed it up.

Lesson | Time | What students do

Rotation A quarter turn is a swap and a flip: (x, y) becomes (n - 1 - y, x). Turn every piece, find the one that never changes, and kick off the walls. | 50 min

- A piece that holds still
- A swap and a flip
- Full circle
- Kick off the wall
- The one that never changes
- Why the Stick gets a big box

Line clears Find full rows with one comparison, pull everything above them down, and score more for more rows at once. Two puzzles, then free play. | 45 min

- A puzzle on the board
- Two at once
- The next puzzle
- Four at once
- Score the hard ones

Speed levels A level every 4 lines, each 15 percent faster, timed with millis() so the stick never feels sticky. Then the moment every game needs: game over. | 50 min

- Level 1
- A shortcut for testing
- Hear it
- Never call delay()
- Soft drop
- Game over

### Materials

- Arduino Uno R3
- Buzzer
- LED matrix, 8x8 x 2
- Thumb stick

### Check for understanding

Each student finishes "Speed levels" 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: "Game over".

Chapter 3. About 1 h

## A pocket game

Put it all together into a game worth sharing.

Lesson | Time | What students do

Project: a pocket falling-blocks game The whole game: a title screen, pieces from a shuffled bag, a lock click, pause, a best score, and it is yours to change and share. | 60 min

- The title screen
- Start, and seed the dice
- The bag
- The click
- Pause
- Your best score
- Make it yours

### Materials

- Arduino Uno R3
- Buzzer
- LED matrix, 8x8 x 2
- Thumb stick

### Check for understanding

Each student finishes "Project: a pocket falling-blocks game" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

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

Your class

## Teach this unit as a class

Start a class from this course and its 6 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.
