← Back to Projects

Arduino TFT Tetris

Handheld Tetris on Arduino Nano + ST7735: game loop, SPI draw, buttons, and sound all on-device.

2026 · Working prototype

  • Arduino Nano
  • C++
  • ST7735
  • SPI
  • Adafruit GFX

Key outcomes

  • On-device game loop with collision, scoring, and piezo cues
  • SPI redraw tuned so controls stayed responsive
  • Fixed flaky display joints before rewriting game logic again

Project overview

Arduino TFT Tetris, photo 1

Arduino Nano + ST7735 Tetris. Input, gravity, collision, scoring, redraw, and piezo cues all run on the board.

System architecture

Arduino TFT Tetris, photo 2

Buttons → state update/collision → framebuffer/SPI → optional piezo.

Game state
Compact grid and active tetromino representation.
Display pipeline
SPI ST7735 updates under Adafruit GFX.
Controls
Physical buttons with debounce.
Audio cues
Piezo events on lock/clear.

Engineering decisions

DecisionAlternativeWhy
Fully on-device logicHost-assistedEverything on the Nano.

Results and future work

Playable prototype. Real-time Tetris with physical controls on ST7735.

Still open. Enclosure polish and difficulty ramps still open.

  • Rotation polish, difficulty ramps, enclosure.
Full engineering log

Motivation

Why I started this

What pulled me in, and what I wanted to get better at.

Why I built it

I wanted Tetris on hardware I could hold, with no host computer cheating on the game loop.

What interested me

Most of the scary bugs were solder and SPI bring-up pretending to be logic errors.

What I wanted to learn

Two-button harness first. Full controls later. Saves a lot of fake debugging.

System Overview

How the system fits together

Arduino Nano + ST7735 Tetris. Input, gravity, collision, scoring, redraw, and piezo cues all run on the board.

01

Game state

Compact grid and active tetromino representation.

02

Display pipeline

SPI ST7735 updates under Adafruit GFX.

03

Controls

Physical buttons with debounce.

04

Audio cues

Piezo events on lock/clear.

Data flow

Buttons → state update/collision → framebuffer/SPI → optional piezo.

Control flow

Single real-time loop; no OS scheduler to hide hitching.

Engineering Breakdown

Broken down by discipline

Each block is the requirement, how that part works, what I checked, and what is still open.

01Embedded Game Loop

Embedded Game Loop

Goal

Keep controls responsive while redrawing on a constrained SPI panel.

Design

Main loop sequences input, gravity tick, collision, scoring, and redraw with a compact board representation.

Challenges

  • Panel init quirks differ by ST7735 variant.
  • Overdraw kills responsiveness.

Iterations

  • Logic on serial
  • Two-button prototype
  • Full handheld controls

Final implementation

Playable on-device Tetris with scoring and sound cues.

On-device play

Game loop, rendering, and controls on the Nano.

02Hardware Bring-up

Hardware Bring-up

Goal

Separate solder faults from logic faults.

Design

Display intermittents were chased at the joint before rewriting game code. Two-button staging reduced variables.

Challenges

  • Intermittent SPI looked like random sprite corruption.
  • Debounce and mechanical bounce mimic 'missed inputs.'

Iterations

  • Computer-driven prototype
  • Solder rework
  • Packaged buttons

Final implementation

Stable display path after joint-level fixes; playable handheld.

Display bring-up

Hardware faults first; then software polish.

Key Design Decisions

Design decisions

DecisionAlternativeWhy
Fully on-device logicHost-assistedEverything on the Nano.
Notes on these decisions

Fully on-device logic

Should a host computer own game state?

Host is easier; on-device teaches real timing and memory limits.

Everything on the Nano.

Results & Validation

What held up

What worked in the end, what I can show for it, and where it's still limited.

Playable prototype

Gameplay and bring-up videos

Real-time Tetris with physical controls on ST7735.

Limitations

  • Enclosure polish and difficulty ramps still open.
Bench notes

The longer design notes, the timeline, and the revisions. The sections above are the system and what I measured.

Evolution

How it got here

The steps I can put in order from the notes. A clip opens from its still.

  1. v1

    Two-button harness

    Prove controls and loop.

  2. v2

    SPI bring-up

    Fix joints and init quirks.

  3. v3

    Playable build

    Full rules + sound cues.

Reflection

Looking back

What surprised me, what I'd redo, and questions I'm still chewing on.

What surprised me

  • Most 'logic bugs' were solder.

What I would redesign

  • Earlier fixture for display continuity tests.

Future improvements

  • Rotation polish, difficulty ramps, enclosure.

Questions that emerged

  • How do you budget redraw vs input latency on 8-bit-class boards?

Notes

  • In embedded games, the first debugger is often a multimeter.