👾👾👾 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]
👾👾👾 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
- ESP32-S3
- WS2812B (4m 60LED/m) - take the coated one - looks better and is more durable
- MAX98357A Amplifier
- 4 Ohm 3W Speaker
- 3x 60mm Arcade Buttons (red, green, blue)
- 1x 12mm Button (metal)
- 3A (better 5A) 5V Power Supply (e.g. USB C) mabe not from AliExpress. or buy a better one from e.g. Anker
- USBC PD Board
- 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
Don't fear the soldering iron. You need to attach two wires to every button.
- Signal Wire: Solder a distinct color wire to one leg of each button.
- Ground Wire: Solder a black wire to the other leg. You can daisy chain all those ground wires together.
- 💡 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 :-)
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:
- Vbus (or Vin) pin of your ESP32
- Vin of the amplifier
- Vin of the LED strip
- 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
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
- Download & Install Arduino IDE 2.x.
- Go to Sketch -> Include Library -> Manage Libraries.
- 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.
- Board Manager: Search for esp32 by Espressif.
- 👉 DOWNGRADE: Select Version 2.0.17 from the dropdown list and install. Do NOT use Version 3.0.x!
- 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)
- Flash Mode: DIO 80MHz
- PSRAM: Disabled (Crucial! The code runs in internal RAM).
- USB CDC On Boot: Disabled (Use the UART port for upload).
- Flash Size: 8MB or 16MB (depending on your board).
Step 4: Upload
- Connect USB cable to the port labeled UART (or COM), not the one labeled USB (if your board has two).
- If upload fails: Hold BOOT, Press RST, Release BOOT.
- Upload Sketch.
- Compilation might take a few minutes.
Box It
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.
- Mount the buttons into your 3D-printed case (screw them in tight).
- Use a drop of hot glue to secure the ESP32, the Amplifier and the USBC-PD board.
- Cable Management: Use zip ties. A loose wire inside can block a button or cause a short circuit during a boss fight.
- Close the lid.
Setup and Config
Web Config & Setup
- Plug in the USB-C Power Supply (min 3A recommended) into the USBC-PD NOT into the ESP32
- Enter Menu: Press & Hold the 12mm metal Button (Pin 18) for 3-4 seconds. The strip flashes BLUE.
- Connect: Phone WiFi -> ESP-RGB-INVADERS (Pass: 12345678).
- Browser: Go to 192.168.4.1.
- Configure: Set your total LED count (e.g., 240, 288) and brightness (start low!). Check the "Sound" box.
- 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!
👾👾Now go destroy some pixels! 👾👾
Videos
Some example videos. First level. This will get MUCH faster after the first boss ;)