Skip to content

multiplexed/MusicVisualizerDancingHackPackRoboLamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackPack RoboLamp Music Visualizer + Beat Dance Hack

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.

Features

  • 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.

Hardware Requirements

  • 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

How It Works

  1. Normal Lamp Behavior
    • Presets, joystick control, and the default distracted mood behavior works like the stock experience (removed two mood modes)
  2. Music Mode ON (Button 3)
    • Firmware reads MSGEQ7 bands and maps spectrum energy to NeoPixel brightness.
  3. Dance Mode ON (Button 4 single-click in music mode)
    • Beat detection computes tempo and drives head/motor movement.
  4. Tap-Tempo Mode (Button 4 double-click in music mode)
    • Tap joystick button to set BPM manually.

Controls and Modes

  • 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

Wiring

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

Getting Started

  1. Clone the repository

    git clone https://github.com/multiplexed/MusicVisualizerDancingHackPackRoboLamp.git
    cd MusicVisualizerDancingHackPackRoboLamp
  2. Open in VS Code + PlatformIO

    • Open the repo folder.
    • Ensure the PlatformIO extension is installed.
  3. Build and upload

    pio run
    pio run --target upload
  4. Optional serial monitor

    pio device monitor

Customization

  • Tune beat detection constants near the BEAT_* constants.
  • Tune dance motion with DANCE_CIRCLE_YAW_DEG and DANCE_CIRCLE_PITCH_DEG.
  • Adjust white/Neopixel behavior in updateMusicLEDs().
  • Enable or disable serial diagnostics with Config::useSerial.

License

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.

About

An Arduino hack to turn the Hack Pack RoboLamp into a music visualizer and make it dance to the beat using a MSGEQ7 chip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors