MSGEQ7 + Arduino and LED Light Bar

I created the light bar to sit on top of my flatscreen TV. Balsa wood, black marker, dremel, and some soldering. Still playing with the low end (bass) for more activity.

The code kind of explains the wiring to the Arduino, but I also have pictures of the SMGEQ7 wiring if anyone is interested. I had this wired to the SainSmart 8 channel relay board driving my glass block Christmas lights (120 Volt AC), but the relays were clicking so much I was afraid that they would burn up. :slight_smile: Ordered the LEDs on eBay and created the light bars.

/** 
 *
 * Christmasqualizer
 * Copyright 2011 Hotchkissmade
 * Released under the GPL
 *
 * Special thanks for the help from the following:
 * http://nuewire.com/info-archive/msgeq7-by-j-skoba/
 *
 * modified by RFBASE
 */
// MSGEQ7 interface pins. See above link for more info.
//
int analogPin = A0;
int strobePin = 12; //pin 4 on the chip
int resetPin = 11; //pin 7 on the chip

// Control pins, from lows to highs in the audio range.
// This MUST have seven values to work correctly.
//
int pins[] = { 2, 3, 4, 5, 6, 7, 8 };

// No real need to edit past here.
//
void setup() {
 Serial.begin(9600);
 pinMode(analogPin, INPUT);
 pinMode(strobePin, OUTPUT);
 pinMode(resetPin, OUTPUT);
 analogReference(DEFAULT);
 
 for (int i = 0; i < 7; i++) {
  pinMode(pins[i], OUTPUT);
 }

 digitalWrite(resetPin, LOW);
 digitalWrite(strobePin, HIGH);
}

void loop() {
  digitalWrite(resetPin, HIGH);
  digitalWrite(resetPin, LOW);
  
  for (int i = 0; i < 7; i++) {
    digitalWrite(strobePin, LOW);
    delayMicroseconds(30);
    int value = analogRead(analogPin)*.75; //added to compensate for volume
if (value > 80) {
Serial.println(value);}
//   delay(20);
    
    if ( value > 90 ) {  //this worked better than the threshold of 120
     digitalWrite(pins[i], HIGH);
    } 

    else if ( value < 90 ) {  //this worked better than the threshold of 120
     digitalWrite(pins[i], LOW); 
    delay(1);    }   
    
    digitalWrite(strobePin, HIGH);
  }
 }