This past semester I taught coding at Marin Horizon Middle School. We started with Scratch and JavaScript with p5.js — visual, immediate, forgiving languages for students who had never written a line of code. By the end of the semester, the class capstone was a full-size arcade cabinet, built by hand and running games the students wrote themselves.

The Build

The cabinet runs on a Raspberry Pi Zero 2 W. Students wrote games in Pygame — a 2D sports game was the one that made it onto the machine. We also loaded classic NES ROMs: Super Mario Bros, Tetris, a bike game. The control panel has a red arcade joystick and six buttons, wired through a USB encoder board to GPIO. I soldered the connections by hand.

Soldering the GPIO controls

The cabinet itself is plywood — cut, assembled, and sanded in a garage over several weekends. A Philips monitor sits inside the frame. It boots straight into the game menu off a systemd service.

Testing the cabinet during build

Why This Project

Teaching middle schoolers to code means navigating a gap between what they can imagine and what they can build. Scratch closes that gap fast. p5.js is close to magic for students who care about visuals. But the question that came up every week was: does this connect to something real?

The arcade cabinet was the answer to that question. It is real. You can touch it. The games running on it were written by students in the same room. That connection — between code on a screen and something you can walk up to and play — is what I wanted them to carry out of the semester.

What I Learned Teaching

Debugging with a 12-year-old is different from debugging alone. They do not read error messages. They do not google first. They either ask immediately or give up. The job is to slow that cycle down — to make the error message interesting rather than alarming, and to make the fix feel like theirs, not yours.

That constraint made me a better explainer. You cannot hide behind jargon with a middle schooler. If you cannot say it plainly, you do not understand it well enough.

Running the student Pygame game at school

The cabinet got delivered to the school at the end of the semester. It is still there.

The finished cabinet at Marin Horizon