Spectrum Analyser with MSGEQ7 board - bloated code

Hello,

I am looking for someone that has a bit of C++ expertise to help with some code. I have copied and modified some code from "HeinzCatchup's" great project on spectrum analyser. My modifications were to add in a left and right (rather than just left) channel. I am using a great breakout board that does all the separating of frequencies for me. And I have connected 7 bands of 15 LEDS together - both left and right.

I have a few problems

  1. Main problem - the code is bulky, bloated and slow (and I am not a good programmer)
  2. There is noise - LEDs light up when there is nothing playing - I have tried setting the lower dB limit to high

code is on arduino create

Any help with direction would be appreciated - and I can post it in the projects page later.
It does work as is........but I know it can be improved immensely

Paul

Have you ever heard of arrays ? Anyway really not only should the argument to the function be an array, but actually all those LED functions should be just one function. You can do the mapping at the very end (just before calling show() with a mapping array.

It does work as is........but I know it can be improved immensely

If it works, why bother changing it unless you want to add more to it.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.