A wearable heart-shaped badge designed to be worn at festivals or any time you want to light up the night. It generates unique LED patterns on startup and reacts to sound in real time.
Hardware
- ESP32 microcontroller
- 24 WS2812B LEDs around the heart perimeter
- MEMS microphone for sound reactivity
- 6 capacitive touch buttons
- USB-C for charging and programming
- 18650 lithium-ion battery (removable)
- Custom heart-shaped PCB with acrylic case
Patterns
Each badge generates three unique procedural patterns on startup using a genome-based system. No two badges look the same.
Sound reactive patterns
Two additional patterns react to ambient sound. The sound reactivity is built on a pipeline that continuously reads audio via I2S, computes RMS to get a dB level, normalizes it against a rolling history window, and applies a gamma curve before feeding it to the LEDs. This gives the patterns a natural feel rather than snapping directly to raw amplitude.
- Flash: The badge brightness pulses in sync with sound while preserving the hue and color structure of the underlying procedural pattern.
- VU meter: LEDs fill up the heart from the bottom tip outward in response to sound level, with a fast attack and slow decay envelope so it reads as responsive without being jittery. The colors come from the same genome system, so each badge has its own color scheme even in this mode.
Controls
The capacitive touch buttons do the following:
- Next pattern: cycles through all patterns, wrapping around
- Brightness: steps through brightness levels, wrapping around
- Replace pattern: swaps the current pattern for a newly generated one; on sound reactive patterns it replaces the base pattern while keeping the sound reactivity
- Off: hold to turn off
- Battery check: fills the heart with LEDs from bottom to top, animating up over two seconds then holding, with a red-to-green color gradient based on charge level
The Mystery Button
The badge has a "?" capacitive touch pad that the README describes as doing nothing. It actually sends a firework to nearby badges over ESP-NOW. No router needed, just peer-to-peer WiFi mesh. Any badge in range receives the message and plays a two-phase animation: a white swell that builds over a second, then a strobing rainbow burst that fades out over the next four. The packets include a TTL field so they relay through multiple badges to extend range across a crowd. There's a rate limit of four fireworks per 40 seconds to keep it from getting spammy.
Background
This project is a spiritual successor to bunnie's BM blinky badge and shares some pattern generation concepts with cubegarden. It strips out the display from the original to keep it small, hence the "light" in the name.