msgeq7 out to 595shift regsisters

// Example 48.1 - > chapter 48 - 30 Jan 2013
// MSGEQ7 spectrum analyser shield - basic demonstration
int strobe = 4; // strobe pins on digital 4
int res = 5; // reset pins on digital 5
int left[7]; // store band values in these arrays
int right[7];
int band;
void setup()
 pinMode(res, OUTPUT); // reset
 pinMode(strobe, OUTPUT); // strobe
 digitalWrite(res,LOW); // reset low
 digitalWrite(strobe,HIGH); //pin 5 is RESET on the shield
void readMSGEQ7()
// Function to read 7 band equalizers
 digitalWrite(res, HIGH);
 digitalWrite(res, LOW);
 for(band=0; band <7; band++)
 digitalWrite(strobe,LOW); // strobe pin on the shield - kicks the IC up to the next band
 delayMicroseconds(30); //
 left[band] = analogRead(0); // store left band reading
 right[band] = analogRead(1); // ... and the right
void loop()
 // display values of left channel on serial monitor
 for (band = 0; band < 7; band++)
 Serial.print(" ");
// display values of right channel on serial monitor
 for (band = 0; band < 7; band++)
 Serial.print(" ");

could some one please help by showing me in very simple terms or modified this for me if its ok to get a drawing or something of the output pins on each one of the 14 out puts so I can have lots of lights and maybe a schematic to help show how to hook it up I am pretty good at the hardware but don’t know how to code and would like to play with this to help me understand better of what is going on and can I output to 595 shift registers and if yes then a little help on how to hook them up and the code please

thank you for any help

and please keep it as simple as possible I am just learning and don’t really know much about code

I'm won't attempt to give the code because I can't test it. but it's a matter of [u]if-statements[/u]...

The basic logic would be something like if left[1] > 100, then turn on LED1. //Not valid C++ code!!!

And as always, I suggest you start simple and develop your program on little piece at a time. For example, start with a few individual LEDs. Then, add the shift registers & LEDs and write a test program to make sure you can address the LEDs before combining the shift-register code with the MSGEQ7 code.

and please keep it as simple as possible I am just learning and don't really know much about code

The two most important concepts in programming are conditional execution (if statements, etc.) and loops (doing something over-and-over, usually until some condition is reached). So far, your program has some for-loops in addition to the main loop. You may need more loops to drive your shift register.

Once you understand those two concepts, you can begin to understand how to put a program together.

ok with that being said how do I set the output pins on a mega and what pins does it use now and how can I change them this will get me started and I can then work on it from there as you wrote

Thank you for the input

Use the pinMode to set a pin to be an output in the setup.
Then use digitalWrite to set that pin high or low.

If you do not know this then your project is way too advanced for your current knowledge and you are better off spending a month doing tutorials.