Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

This Arduino Project Hub build implements a compact Tetris-style game on an 8×8 WS2812B LED matrix: 64 pixels controlled by an Arduino Nano, three push buttons, and a piezo buzzer. Its published sketch uses FastLED and assigns specific pins for the display and controls. Those assignments are not a complete wiring plan, however—the project does not identify the matrix model or provide its power requirements, so check the documentation for your exact module before connecting it.

Parts and code configuration

Arduino Project Hub’s project, credited to mircemk and dated April 3, 2025, lists these components and tools:

  • One Arduino Nano
  • Three push buttons
  • One 8×8 LED matrix module
  • One Grove piezo buzzer
  • A soldering kit and Arduino IDE

The sketch configures 64 LEDs as WS2812B pixels, uses GRB color order, and sets matrix dimensions to 8 by 8. Its brightness setting is 50. These are values in the published code, not evidence of a measured brightness or a recommendation for every matrix. See the Arduino Project Hub project and sketch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Active pin assignments

The sketch assigns these Arduino pins:

Function Pin in the published sketch
LED matrix data Digital pin 6
Buzzer output Digital pin 2
Left control Digital pin 9
Right control Digital pin 10
Rotation control Digital pin 8

These are code assignments only. The project page does not provide a complete wiring diagram or specify a power supply, current budget, level shifter, resistor, or capacitor. Confirm the pinout and electrical requirements for the particular matrix and Nano-compatible board you intend to use; do not infer those details from the sketch’s pin definitions.

#1 Best Overall
HiLetgo 3pcs MAX7219 8x8 Dot Matrix LED Display Module 5V MCU Control MAX7219 8 * 8 LED Dot Matrix DIY Kit
  • 1. Single module can drive an 8 * 8 dot matrix common cathode
  • 2. Module Operating voltage: 5V
  • 3. Module dimensions: length 3.2 cm X 3.2 cm wide X 1.5 cm high
  • 4. Holes with four screws, diameter 3mm
  • 5. Modules with input and output interfaces, support for cascading multiple modules

How the game works

The code defines the seven familiar tetromino shapes and their rotations, assigns colors, and tracks occupied board cells. The player can move a falling piece left or right and rotate it, while timed gravity advances it down the board. When it cannot descend further, the sketch places it, checks for completed rows, flashes and clears full rows, shifts the remaining rows down, and adds points.

The published code also includes a normal mode and a simplified “kids” mode, along with splash and game-over animations, a scrolling score, and buzzer sounds. These describe features implemented in the sketch; they are not a report of independent hardware testing.

Rank #2
Lonely Binary 3-Pack 8x8 LED Matrix MAX7219 3-Color for C++ & ESP32
  • 【3-COLOR VARIETY PACK】Includes 1 Red, 1 Green, and 1 Blue 8x8 dot matrix LED display module (64 LEDs each, single fixed color per module — not full-color RGB). Mix modules for colorful scrolling text, status indicators, or layered pixel art. Each module is independently controllable.
  • 【3D-PRINTED ENCLOSURES INCLUDED】Three custom-fit 3D-printed PLA cases (Red, Green, Blue to match each module) protect modules from dust and scratches with a finished look — no exposed PCB. Suitable for desktop, wall, or embedded builds.
  • 【CHAINABLE DESIGN, BASIC SOLDERING REQUIRED】Each module has labeled IN/OUT ports for daisy-chaining (DOUT to DIN) to build wider displays such as 24x8 scrolling text, retro paddle-and-ball or snake-style games, or animations. Basic soldering required to connect pin headers between modules.
  • 【MAX7219 DRIVER + SPI CONTROL】Onboard MAX7219 IC with 16-level software-adjustable brightness, low-power shutdown, and constant-current LED drive. Simple 5-pin SPI control (VCC, GND, DIN, CS, CLK). Power the module from 5V for full brightness, or from 3.3V when you want the data lines to match a 3.3V board such as ESP32 or Raspberry Pi Pico. Works with ESP32, ESP32-S3, ESP8266, Raspberry Pi Pico, STM32, C++, MicroPython and CircuitPython.
  • 【ENDLESS PROJECT IDEAS】Build scrolling text, retro arcade-style games, notification tickers, weather widgets, audio visualizers, pixel art frames, or educational demos. Sample code on the Lonely Binary GitHub. Australian-designed open-source maker hardware — great for hobbyists, classrooms, makerspaces, or gifting to electronics enthusiasts.

Match the pixel mapping to your matrix

The active mapping in the sketch calculates a pixel index as y * MATRIX_WIDTH + x, which lays out coordinates in row-major order. Physical 8×8 modules can start at different corners and route pixels in different directions. The source includes alternative mapping patterns in comments, but you should check your module’s first-pixel location and direction and adjust the mapping if necessary. Otherwise, shapes or colors may appear mirrored, rotated, or scrambled even when the game logic is working.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

FastLED and library alternatives

This tutorial is written for FastLED. Its official site describes support for addressable LEDs including WS2812B pixels. FastLED’s official site

Rank #3
HiLetgo MAX7219 Dot Matrix Module for Arduino Microcontroller 4 in 1 Display with 5pin Line
  • Operating Voltage: 5V
  • A single module can drive a 8x8 dot matrix common cathode
  • Dimensions: 12.8X12.8X1.3 cm
  • Fixing screws with 64 holes with a diameter 3mm

Adafruit NeoPixel is another library for single-wire addressable pixels, including WS2812-family LEDs. It is an alternative library ecosystem, not a drop-in replacement for this sketch: switching libraries means adapting the code to the other library’s API and checking its compatibility with your selected board and core. Adafruit NeoPixel’s official repository

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify electrical details for the exact module

“8×8 WS2812B matrix” identifies the pixel arrangement and LED family, but it does not establish a particular manufacturer, board layout, connector, or safe power arrangement. Check the documentation supplied for your selected module for its voltage and current requirements, data-input expectations, connector pinout, and any recommended protection or wiring. Adafruit’s guide links to a WS2812B datasheet, but the Arduino Project Hub build does not identify its matrix model, so that datasheet cannot be assumed to describe the module used in this project. Adafruit NeoPixel guide resources

Quick Recap

Bestseller No. 1
HiLetgo 3pcs MAX7219 8x8 Dot Matrix LED Display Module 5V MCU Control MAX7219 8 * 8 LED Dot Matrix DIY Kit
HiLetgo 3pcs MAX7219 8x8 Dot Matrix LED Display Module 5V MCU Control MAX7219 8 * 8 LED Dot Matrix DIY Kit
1. Single module can drive an 8 * 8 dot matrix common cathode; 2. Module Operating voltage: 5V
$8.39
Bestseller No. 3
HiLetgo MAX7219 Dot Matrix Module for Arduino Microcontroller 4 in 1 Display with 5pin Line
HiLetgo MAX7219 Dot Matrix Module for Arduino Microcontroller 4 in 1 Display with 5pin Line
Operating Voltage: 5V; A single module can drive a 8x8 dot matrix common cathode; Dimensions: 12.8X12.8X1.3 cm
$8.99
Best Value
GeeekPi RGB LED Matrix Shield for Arduino Nano ESP32 / Nano R4, 24-Bit Full-Color LED Display
  • High‑Density Full‑Color RGB LED Matrix – Integrates a rich array of individually addressable RGB LEDs, capable of producing stunning visual effects, dynamic animations, and interactive displays – perfect for creative projects and IoT feedback systems.
  • Single‑Wire Digital Control – All LEDs are controlled through a single data line, dramatically reducing wiring complexity. Supports 24‑bit full-color (8 bits per channel for Red, Green, and Blue) with cascading data transmission.
  • Optimized for Arduino Nano ESP32 & Nano R4 – Designed specifically for the Arduino Nano ESP32 (ESP32‑S3, up to 240 MHz) and Arduino Nano R4 form factor. Seamlessly mates via standard pin headers – no soldering required.
  • Advanced ESP32 Features (Web UI / RMT) – the shield unlocks advanced capabilities including Web UI control and RMT (Remote Control) demo, enabling complex lighting algorithms and real‑time responsive installations.
  • Basic Support for Nano R4 (LED Matrix) – Fully compatible with Arduino Nano R4 for basic Neopixel demonstrations, making it accessible for beginners and educators who want to learn addressable LED programming.
Rank #4
5Pcs WS2812B 5X5 5050 RGB LED Full Color Driver 25 Bit Color Lamp Development Board,LED Matrix Integrated Drive Drivers Board LED Module for Arduino Project
  • 5Pcs WS2812B 5X5 5050 RGB LED Full Color Driver 25 Bit Color Lamp Development Board,LED Matrix Integrated Drive Drivers Board LED Module for Arduino Project
  • WS2812 Full Color LED Module (25 bit lamp beads)
  • Size: 3.89cm*3.89cm
  • The control circuit and the RGB chip are integrated in a 5050 packaged component to form a complete external control pixel.
  • When the refresh rate is 30 frames / second, the number of cascades is not less than 1024 points. The data transmission speed up to 800Kbps.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.