👾👾👾 Ultimate 1D RGB Invaders (ESP32-Edition) 👾👾👾 [Arcade Action]

by WorksAsDesigned in Circuits > Arduino

38 Views, 2 Favorites, 0 Comments

👾👾👾 Ultimate 1D RGB Invaders (ESP32-Edition) 👾👾👾 [Arcade Action]

titel_NEU.jpg
img1.png
img2.png
3.jpg

👾👾👾 Ultimate 1D RGB Invaders (ESP32-S3 Edition) 👾👾👾

The 1D Arcade Shooter that proves you don't need 4K graphics to sweat.

Welcome to Ultimate RGB Invaders. You are about to turn a strip of lights into a battlefield. You control a spaceship (a single, brave pixel) fighting against waves of chromatic enemies. It has Bosses. It has Highscores. It has a Web Interface because we are living in the future.

This project is optimized for the ESP32-S3. Why? Because it supports I2S Audio for that crisp retro-arcade sound. Maybe not Dolby digital --- but if the game uses only 240 pixels... it fits :-)


Supplies

part1.jpg
sacLED.jpg
  1. ESP32-S3
  2. WS2812B (4m 60LED/m) - take the coated one - looks better and is more durable
  3. MAX98357A Amplifier
  4. 4 Ohm 3W Speaker
  5. 3x 60mm Arcade Buttons (red, green, blue)
  6. 1x 12mm Button (metal)
  7. 3A (better 5A) 5V Power Supply (e.g. USB C) mabe not from AliExpress. or buy a better one from e.g. Anker
  8. USBC PD Board
  9. 3D printed Case


Optional:

Sometimes cheapLED stripes tend to flicker. A sacrifying LED (using a 1n4007 diod in the +5V to that single LED) and a 330 Ohm resistor in the data line should solve this problem. Usually it should work without.


You get all parts e.g. at AliExpress for around 35-50€

Start With the Buttons

buttons1.jpg

Don't fear the soldering iron. You need to attach two wires to every button.

  1. Signal Wire: Solder a distinct color wire to one leg of each button.
  2. Ground Wire: Solder a black wire to the other leg. You can daisy chain all those ground wires together.
  3. 💡 Pro Tip: Daisy-chain the Ground wires! Solder one long black wire that hops from button to button, so you only have ONE single Ground wire going back to the ESP32. Saves a ton of mess.


Optional:

Most Arcade buttons have a built in LED (usually powerd with 12V). You can also connect them to +5V and the common ground.

ESP32 - Soldering All Those Tiny Legs (the Hard Part :-)

kabelsalat_diagramm.png
esp1.jpg
esp2.jpg
amp1.jpg

This is the heart of the machine. ESP32 S3

A) Power Distribution (USB-C PD Board)

Configure your USBC-PD Board to output 5V. Connect the output to a Wago terminal or solder point to split the power three ways:

  1. Vbus (or Vin) pin of your ESP32
  2. Vin of the amplifier
  3. Vin of the LED strip
  4. optional : light LED of arcade buttons

ALL ground (buttons, ESP, LED, amp, ...) can be connected together.


⚠️ CRITICAL: The LED Strip takes power directly from the PD Board, NEVER through the ESP32!

Next ist the tricky part. Many rather small soldering tasks to the ESP:


Component ESP32-S3 Pin Note

GPIO 7 LED Data to the stripe (Green wire usually)

GPIO 15 Button Blue

GPIO 16 Button Red

GPIO 17 Button Green

GPIO 18 12mm metal button Menu / WiFi


ESP32 to amplifier:

GPIO 4 Audio BCLK

GPIO 5 Audio LRC

GPIO 6 Audio DIN

5V & ground to your power source

Software

arduino1.png

Get the code onto the chip.

Step 0: Download the source code here (find it in the STL area) (take the SOUND version):

https://makerworld.com/de/models/2254346-1d-rgb-invader-retro-game#profileId-2455425

This is where most people fail. Read carefully.

Step 1: Install Arduino IDE & Libraries

  1. Download & Install Arduino IDE 2.x.
  2. Go to Sketch -> Include Library -> Manage Libraries.
  3. Search for FastLED (by Daniel Garcia) and install it.

Step 2: Board Settings (The "Audio Trap")

The audio engine requires a specific core version to run without glitches.

  1. Board Manager: Search for esp32 by Espressif.
  2. 👉 DOWNGRADE: Select Version 2.0.17 from the dropdown list and install. Do NOT use Version 3.0.x!
  3. Select Board: ESP32S3 Dev Module.

Step 3: Tools Menu Settings

Set these exactly as shown to avoid boot loops: (especially many cheap clone boards have issues with regular settings)

  1. Flash Mode: DIO 80MHz
  2. PSRAM: Disabled (Crucial! The code runs in internal RAM).
  3. USB CDC On Boot: Disabled (Use the UART port for upload).
  4. Flash Size: 8MB or 16MB (depending on your board).

Step 4: Upload

  1. Connect USB cable to the port labeled UART (or COM), not the one labeled USB (if your board has two).
  2. If upload fails: Hold BOOT, Press RST, Release BOOT.
  3. Upload Sketch.
  4. Compilation might take a few minutes.


Box It

ox1.jpg
chaos1.jpg

Time to hide the cable mess...noone will ever see it again ;-)

Find the STL files for the Box here:

https://makerworld.com/de/models/2254346-1d-rgb-invader-retro-game#profileId-2455425

Later updates can be done via OTA update function.

  1. Mount the buttons into your 3D-printed case (screw them in tight).
  2. Use a drop of hot glue to secure the ESP32, the Amplifier and the USBC-PD board.
  3. Cable Management: Use zip ties. A loose wire inside can block a button or cause a short circuit during a boss fight.
  4. Close the lid.


Setup and Config

a2.jpg
a1.jpg

Web Config & Setup

  1. Plug in the USB-C Power Supply (min 3A recommended) into the USBC-PD NOT into the ESP32
  2. Enter Menu: Press & Hold the 12mm metal Button (Pin 18) for 3-4 seconds. The strip flashes BLUE.
  3. Connect: Phone WiFi -> ESP-RGB-INVADERS (Pass: 12345678).
  4. Browser: Go to 192.168.4.1.
  5. Configure: Set your total LED count (e.g., 240, 288) and brightness (start low!). Check the "Sound" box.
  6. Save: The system reboots.


Optional:

You can connect your RGB Invaders machine to your wifi and give it a fixed IP address.

OTA updates are also possible.

Later you can use this settings page to fine tune all levels, bosses, colors, sounds - pretty much everything which is somehow relevant for the game. The game balance is very well tested (for a 240LED stripe). Hard but possible. There is also a simplified kids-mode.


Play!

k1.jpg

👾👾Now go destroy some pixels! 👾👾

Videos

1D RGB Invaders Retro Arcade Game DIY
1D RGB Invaders - ESP32 Arcade Game

Some example videos. First level. This will get MUCH faster after the first boss ;)