I hacked the HackPack RoboLamp into a music visualizer with some help from Claude that dances to the beat. This project keeps core RoboLamp controls (presets, joystick control, and mood behavior) while adding MSGEQ7-based spectrum lighting and beat/tap-tempo dance motion.
- Music Visualizer Mode: NeoPixel ring reacts to 7-band audio data from MSGEQ7.
- Beat-Driven Motion: Lamp head and height movement sync to detected tempo.
- Tap-Tempo Dance: Audo detect tempo for songs with strong base beat or manual BPM control by tapping the joystick button.
- Circle Dance Pattern: Head movement traces a smooth circular motion to the beat.
- Crunchlabs HackPack RoboLamp (base platform)
- Equalizer IC / Module: MSGEQ7 (7-band graphic equalizer)
- Microphone Front-End: Analog mic preamp module feeding MSGEQ7 input (I used a DAOKAI MAX9814 but you could just plug music directly into the 3mm jack on teh MSGEQ7 board. I took my mic output and passed it through a capacitor and then into the wire that connected through a 3mm audio connector (e.g., I used a Speaker Wire TRS Stereo Male Plug to Bare Wire Pigtail 3.5mm Jack Connector Adapter)
- Mic module part number depends on your build (add your exact module PN here)
- NeoPixel Ring: 12-pixel ring used by the stock RoboLamp wiring
- Normal Lamp Behavior
- Presets, joystick control, and the default distracted mood behavior works like the stock experience (removed two mood modes)
- Music Mode ON (Button 3)
- Firmware reads MSGEQ7 bands and maps spectrum energy to NeoPixel brightness.
- Dance Mode ON (Button 4 single-click in music mode)
- Beat detection computes tempo and drives head/motor movement.
- Tap-Tempo Mode (Button 4 double-click in music mode)
- Tap joystick button to set BPM manually.
- Button 1
- Distracted mood
- Button 3
- Single-click: Toggle Music Visualizer Mode (clicking again turns it off)
- Button 4
- Single-click:
- In music mode: Toggle beat-driven dance
- Outside music mode: Recall Preset 4
- Long-press: Save Preset 4
- Double-click:
- In music mode: Toggle tap-tempo dance mode
- Outside music mode: Set Focused mood
- Single-click:
Pin mapping from this firmware:
| Component Signal | MCU Pin | Firmware Symbol |
|---|---|---|
| MSGEQ7 RESET | D13 | EQ_RESET_PIN |
| MSGEQ7 STROBE | A5 | EQ_STROBE_PIN |
| MSGEQ7 OUT | A4 | EQ_OUT_PIN |
| NeoPixel Data | D3 | neopixelPin |
| Yaw Servo PWM | D10 | servoYawPWMPin |
| Pitch Servo PWM | D9 | servoPitchPWMPin |
| Motor Speed PWM | D11 | motorSpeedPin |
| Motor Direction | D12 | motorDirectionPin |
| Joystick Yaw Axis | A6 | JoyYawPin |
| Joystick Pitch Axis | A7 | JoyPitchPin |
| Height Encoder | A0 | heightEncoderPin |
Audio path:
- Mic preamp OUT -> MSGEQ7 IN
- MSGEQ7 OUT -> MCU A4
- Share GND between mic board, MSGEQ7 board, and MCU
-
Clone the repository
git clone https://github.com/multiplexed/MusicVisualizerDancingHackPackRoboLamp.git cd MusicVisualizerDancingHackPackRoboLamp -
Open in VS Code + PlatformIO
- Open the repo folder.
- Ensure the PlatformIO extension is installed.
-
Build and upload
pio run pio run --target upload
-
Optional serial monitor
pio device monitor
- Tune beat detection constants near the
BEAT_*constants. - Tune dance motion with
DANCE_CIRCLE_YAW_DEGandDANCE_CIRCLE_PITCH_DEG. - Adjust white/Neopixel behavior in
updateMusicLEDs(). - Enable or disable serial diagnostics with
Config::useSerial.
This project is licensed under the MIT License. See source file headers for details.
Credits
- Original RoboLamp platform and baseline firmware by Crunchlabs LLC.
- Hack extensions and tuning by project contributors.