Hello , i am working on making an audio spectrum analyzer using MSGEQ7 , i actually knows how the strobe and reset work to give the values for the 7 bands after being multiplexed but i want the results out on a 8x8 LED matrix but i couldn't figure how to do it while keeping the no of pins used from arduino = 3
so i have to make each led on an output pin ??
that would take too much pins i thought there would be a way to use it with the max7219 as an example ???
No but you have to add extra hardware like shift registers or port expander chips. Or even things like the max7219.
However your original question was not very clear about what your constraints are.
@ Grumpy Mike : i understand that , i just can not figure out how to use the output from msgeq7 "analog input at arduino" for making an analyzer , i have read about the max7219 and how to use it to light certain leds but i can not understand how to use the value at the analog pin to control the leds , hope it was clear now.. thnx alot
@ Richard , i understand that i will use 3 pins for the MSGEQ7 , and 3 for the IC controlling the LEDs , guess i will use that 7x10 matrix it would be better as the analyzer works on 7 bands , i just can not figure out how to take the analog readings and make them light the LEDs , for example the first band , the analog reading was 800 (from 1023) so it should light the first 7-8 LEDs , then it switches to the next band with another reading and different numbers of LEDs should be on. My question is that i do not understand how to make this work " switching the LED column depending on the band. Also my programming skills are not very good so it would be great if you could tell me which is easier to use the max7219 or the shift register ??
Thanks alot
Do you know how to get the 7 analogue values into the arduino?
It depends on what you want the display to look like. Lets assume you want to make each reading correspond to a column on the display. Then you set the LEDs in that column proportional to the size of the reading.
I assume you know how to turn an LED on using the 7219, if not see the data sheets and the many example codes knocking around.
Then simply divide the analogue input by 512 to see the highest LED to set. Set this plus all the ones leading up to it. Do this for all the columns / readings.
why should i divide the reading by 512 i didnt get that??
As Richard said, if you have only 8 LEDs on your matrix you need to scale the number you read from the A/D to match the LEDs. Therefore if you divide by 512 you get the value you can actually display.
but going through the loop 7 times with a delay each time to store the values , and then to show these values , wouldn't this make the display appear a little bit off-time ?