One button. One 32ร8 LED matrix. A pocketful of arcade games + a slick WiFi admin panel.
MatrixArcade turns a cheap ESP8266 + MAX7219 4-in-1 (32ร8) dot-matrix and a single button into a public-spot arcade and an info kiosk. Players get one-button games; you control everything from your phone over WiFi โ pick games, write notices, show a clock/weather, see live play stats, and more.
Made by hjLabs.in.
- ๐น๏ธ 3 one-button games โ Dino Run, Flappy, and the "11.11" reaction challenge.
- ๐ชง Info panels โ scrolling notices (multi-line + emoji), healthy-lifestyle sayings, internet clock, date, weather.
- ๐ฑ WiFi admin panel โ sleek, mobile-friendly; no app needed (password-protected).
- ๐ Live gameplay analytics โ interactive charts (plays-by-hour per game, wins per game).
- ๐พ Everything persists โ settings, high scores and stats survive power-off (saved to flash).
- ๐ ๏ธ Tunable โ brightness, scroll speed, screen-saver wait, per-panel durations, win effects, timezoneโฆ
| Game | Control | Goal |
|---|---|---|
| ๐ฆ Dino Run | Press = jump | Jump over the cacti |
| ๐ค Flappy | Tap = flap | Fly through the gaps |
| โฑ๏ธ 11.11 | Tap = stop | Stop the clock at exactly 11.11s to win (the displayed value must read 11.11 โ nothing nearby counts). Number stays visible up to 15s; no press by 15s โ back to start. Win = a celebration you customize in the panel! ๐ |
- Tap = play / jump / flap / stop.
- Hold (~0.6 s) on the menu = switch to the next game.
- High scores, 11.11 best time, win counts and total plays are saved to flash (survive power-off).
Besides games, the display rotates through info panels โ for each one you set on/off, how many seconds it shows, and a โถ preview (test it on the matrix instantly), all in one row of the admin panel:
Notice (custom multi-line text, with emoji ๐) ยท Sayings (healthy-lifestyle tips) ยท Clock (internet time) ยท Date ยท Weather (any city, with humidity/wind/etc).
In All-in-one style (games on + panels on) it plays games normally and, after a configurable screen-saver wait, cycles the enabled panels until someone presses the button. Turn games off for a pure kiosk. When idle, it also shows a MADE BY HJLABS.IN promo every ~30 minutes.
- Multiple lines โ add/remove lines (each scrolls in turn).
- Fonts โ Normal / Bold / Italic / Wide.
- Emoji โ a curated set renders as 8ร8 icons: โค โญ โ โ ๐ฅ ๐ง ๐ ๐ต ๐ ๐ (others are skipped).
- Smooth scrolling โ text now renders at 60fps with time-based motion, so it's smooth even at low speeds.
The MAX7219 has VCC / GND / DIN / CS / CLK = SPI. (DIN/CLK below are the ESP8266 hardware-SPI pins.)
| MAX7219 module | NodeMCU pin | ESP8266 GPIO |
|---|---|---|
| VCC | VIN (5 V) | โ |
| GND | GND | โ |
| DIN | D7 | GPIO13 (MOSI) |
| CLK | D5 | GPIO14 (SCK) |
| CS | D6 | GPIO12 |
Button between D1 (GPIO5) and GND โ that's it.
D1 (GPIO5) โโ/ button โโ GND
- D1/GPIO5 is a safe, normal pin (no boot caveat like D8 had).
- Uses the internal pull-up, so no external resistor is needed. The firmware is set for this
(
BTN_PIN D1,BTN_ACTIVE_HIGH 0). - Pressed = LOW. Idle = HIGH.
Power: one panel from VIN (5 V) at low brightness is fine. For more panels / high brightness, use a separate 5 V supply and join grounds.
- Power the device. It creates an open WiFi access point named
MatrixArcade. - Connect your phone/laptop to it โ a captive portal login pops up automatically (or browse to http://192.168.4.1).
- Enter the password
admin123. - From the panel you can:
- Enable games: on = button plays games; off = kiosk (panels only).
- Panels to rotate: tick which of Notice / Clock / Date / Weather appear, and set how many seconds each one shows.
- Notice lines: add multiple lines with + Add notice line (each added line has a โ delete button; they're shown one after another). Pick the font (Normal / Bold / Italic / Wide).
- Text scroll speed: slider (applies to all scrolling text).
- Weather city + Time zone โ clock auto-sets from the internet (NTP); weather shows condition, temp, feels-like, humidity, wind, rain, pressure.
- 11.11 win screen: effect + message, with a โถ Test button to preview it on the display instantly.
- Live win alerts: when someone wins, the open admin page shows a banner + plays a sound + vibrates. Use the Test alert button to try it. (True OS pop-up notifications additionally require HTTPS, which the device doesn't serve โ so banner+sound is the reliable path over the device's plain-http page.)
- Mode: Menu (players cycle games with Hold) or ๐ Locked (only the chosen game plays โ pick it in "Locked game").
- Locked game: which single game runs in Locked mode.
- Enabled games: which games appear in the menu.
- Brightness: 0โ15, applied live.
- 11.11 winning screen: choose the effect (Fireworks / Flashing WIN / Expanding rings / Sparkle rain / Text only) and type a custom win message.
- Screen-saver wait: how long the display sits on the game start-screen before the info panels take over (saved to flash).
- WiFi: join your home network (see below) so you can reach the panel without connecting to the device's AP.
- Winning stats: total plays, 11.11 wins, best 11.11 time, and high scores.
- Reset high scores or counters.
The AP is open so anyone can reach the login page; the
admin123password gates the controls. This is hobby-grade security (password is hardcoded in the sketch) โ fine for a fun installation, not for anything sensitive. Change it viaADMIN_PASS/ SSID viaAP_SSIDin the.ino.
By default the device runs its own access point. You can also join it to your home WiFi so you can open the admin panel from your normal network โ without switching to the device's hotspot.
- Connect to the
MatrixArcadeAP โ log in (admin123) โ Configure WiFi. - Pick your network from the scanned list, enter the password, Save & connect.
- The device reboots, joins your WiFi, and scrolls its IP address on the matrix at startup.
- From any device on your home network, open that IP or simply
http://matrixarcade.local(mDNS โ no need to remember the IP).
- Connecting is non-blocking โ the games run immediately while it joins in the background, and it scrolls the IP once it connects.
- It tries the home WiFi for ~1 minute; if it can't connect (e.g. router slow/off), it switches to AP-only mode so the setup portal is always reachable. A dropped connection gets a fresh 1-minute retry window. Rebooting or saving WiFi again re-tries.
- "Forget WiFi" in the WiFi page returns it to AP-only mode.
Why
matrixarcade.localinstead of an HTML page that "auto-scans" the network? Browsers can't port-scan a LAN for security reasons, so that approach isn't reliable. mDNS is the proper, robust way to find the device by name. On most phones/PCs*.localworks out of the box (Android may need the IP shown at boot).
Open the Arduino Serial Monitor at 115200 baud, type a command, press Enter โ the matrix jumps straight to that screen so you can see how it looks:
| Command | Shows |
|---|---|
dino / flappy |
that game's game-over screen |
win |
the 11.11 WIN celebration (using the current effect + message) |
miss |
the 11.11 "missed" result screen |
best |
the NEW BEST screen |
rotate |
the info-panel rotation preview (notice/clock/date/weather) |
weather |
fetch the weather right now |
play dino/flappy/1111 |
start that game live |
help |
list all commands |
- ESP8266 board support:
Preferences โธ Additional Boards Manager URLsโhttp://arduino.esp8266.com/stable/package_esp8266com_index.json, thenBoards Managerโ install esp8266. - Library:
Manage Librariesโฆโ install MD_MAX72XX (majicDesigns). - Board: NodeMCU 1.0 (ESP-12E Module) (or LOLIN(WeMos) D1 mini); pick the Port.
Open MatrixArcade/MatrixArcade.ino โ Upload. The display should scroll
>DINO RUN BEST 0 โฆ. Tap to play.
~/.local/bin/arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 MatrixArcade
~/.local/bin/arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2 MatrixArcade
(Find the port with arduino-cli board list.) โ
Verified compiling: RAM 37%, flash 27%.
Edit the #defines at the top of MatrixArcade.ino:
| Symptom | Fix |
|---|---|
| Text garbled / split across panels | change HARDWARE_TYPE โ GENERIC_HW, then ICSTATION_HW, then PAROLA_HW |
| Mirrored leftโright | #define FLIP_X 1 |
| Upside down | #define FLIP_Y 1 |
| Only letters upside-down | #define FONT_FLIP_Y 1 |
| Button does nothing | check button is between D1 and GND |
- 11.11 difficulty:
REACT_TOL(win window, default ยฑ0.20 s) andREACT_TIMEOUT(auto-reset time, default 15 s). - Game speed/feel: the constants inside each game's
namespace. - Frame rate:
FRAME_MS(33 โ 30 fps).
Those need direction control โ add 2โ3 buttons (pin โ GND) and I'll wire in a D-pad and those games.
esp_matrix_games/
โโโ README.md
โโโ platformio.ini # optional (system PlatformIO is broken here; use arduino-cli)
โโโ MatrixArcade/
โโโ MatrixArcade.ino # open this