LED Tetris (Ledtris)

Classic NES version of Tetris on a DIY LED Matrix Display

Similar projects worth following
Play the classic NES Tetris on a WS2812b LED matrix display with optional next block display and score display using the Fceux emulator and an Arduino or AVR display driver.

Design Requirements

I came up with the following requirements. In addition it should use off-the-shelf hardware, be reliable, fairly robust and compact.

Must Have

  1. Custom LED Matrix Display
  2. A way to drive it
  3. The NES version of Tetris

Should have

  1. Graphics streamed from NES emulator
  2. Sound
  3. Controller support
  4. Usable with any laptop/computer
  5. Minimal color bleed between pixels

Could have

  1. Block Preview
  2. Score Display
  3. Hi-Score Display
  4. Integrated Speaker

Won't Have

  1. Support for multiple emulators
  2. Block statistics display
  3. Multiplayer ( NES version does not support this )

Initial design

The basic idea is to have led strips stuck on a plate with a diffuser on top. These are driven by a micro-controller which receives data from a laptop/computer running emulator and some kind of custom script.


For the emulator I choose FCEUX, because it emulates Tetris very accurately, it has sound, joystick support and can be built for many platforms including raspberry pi. It also has a built in Lua interpreter which allows me to read pixels from the screen and send them to a serial port.

LED Strips

I used WS2812B LED strips, because they are widely available and fairly straightforward to drive. The LED strips act as a big shift register with individually addressable LEDs. They generate quite a lot of heat, so I decided to stick them on a sheet of aluminium to act as a heat sink.


People have written libraries for driving WS2812B chips for almost every platform, so I had a lot of options. In the end I settled with Arduino/AVR8. For the Arduino I used the Neopixels library and for the bare-metal AVR I used the light_ws2812 library. I had some ATMega16's so I used one of those. It has just enough RAM to hold 200 pixel values and then some.

Power Supply

There are really cheap 5 V power supplies designed specifically for powering these LED strips. Each LED draws 60 mA at full intensity, so a 12 A power supply is required for powering all 200 LEDs. I will also power the micro-controller, the score display and the Block Preview display from this supply, so max power will be a little over 12 A. I don't plan on running the display on max brightness, so it will probably draw around 4 - 6 A.

Score Display

I had some salvaged seven segment displays from another project. The score display in the game has 6 digits, so I combined two 3 digit displays. I could have used the micro-controller to drive the display directly, but I'd still need a chip for multiplexing, so I opted for a simpler solution: The MAX7219 display driver. It has an SPI-like interface for writing to the display.

Block Preview Display

This could not be simpler: A 4x2 LED matrix using the same structure as the large matrix. It could even be chained to the data-out pin of the large LED matrix.

  • 1 × LED strip WS2812B 300LED 5M (important for the spacing of the LEDs)
  • 1 × Microcontroller Arduino Compatible _or_ ATMega16
  • 1 × Power Supply 5 V @ 12 A

  • AVR Firmware and Improved Instructions

    Koen van Vliet03/21/2019 at 22:25 0 comments

    I have updated the build instructions and finished the AVR firmware. Changes in the AVR firmware have been backported to the Arduino sketch. Check it out at

  • PCBs are here!

    Koen van Vliet03/25/2017 at 14:03 0 comments

    Today the printed circuit boards came in the mail. I am still waiting for some of the components, which I ordered from various Ebay sellers.

  • Ordering PCBS

    Koen van Vliet03/04/2017 at 13:46 0 comments

    I recently designed a PCB with a score display, ATmega8 and a USB->serial converter (I chose to use a CH-340, because it's ridiculously cheap.) The score display consists of a 6 digit seven segment display driven by a MAX7219. I could have driven it using the ATmega8, but I would still need a bunch of transistors to drive the cathodes of the display, so in the end this was the cleanest solution.

    I will release the gerbers once I have tested these boards.

  • Build Instructions and Source Code Released!

    Koen van Vliet02/20/2017 at 20:30 0 comments

    Today I released the build instructions and source code along with all the required CAD files. You fork this and adapt it to work with your display if you already have one. You will need at least 10x20 LEDs for this to work.

    View source and build instructions at:

  • Burning some plywood & Square Pixels!

    Koen van Vliet02/17/2017 at 21:31 0 comments

    The led displays are done now. The repo containing all sourcecode and cad files will be public next week.

    I used the lasercutter at school to create a wooden grid. This grid makes the pixels look nice and square. A white diffuser is placed on top and everything is bolted together.

  • It's playable!

    Koen van Vliet02/01/2017 at 11:18 0 comments

    I threw together a quick test setup with the LED matrix on a makeshift stand and an Arduino driving the WS2812B. It appears to be working up to about 20-30fps. I should have about 3ms of left-over processing time at 60fps, but there seems to be an optimization issue here.
    Edit: This appears to be a limitation of the WS2812B.

    Here's a video of the test setup:

View all 6 project logs

View all instructions

Enjoy this project?



Steve wrote 5 days ago point

Has anybody finished this project with a working score display? I've struggle with the MAX7219 7-Segment-Display since the day of starting this project.

Please contact me

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates