I have run into a problem I do not understand at all trying to

I have run into a problem I do not understand at all trying to set up a music visualizer-type thing with FastLED and elm-chan’s fft library.
My code is Steven Hills’ version of the Piccolo ( https://gist.github.com/steven509/01daea2687283d92a245 ), but whenever I include the FastLED.show() command my UNO crashes.
My code is here ( https://gist.github.com/ianftw/ebf9fef60f2eebcb2310 ).
I am trying to have different sections of a 4x4 cube light up in response to low, middle, and high frequencies, but like I said it just crashes any time I try to write to the LEDs.
I’m using Arduino 1.0.5 on Windows with an Arduino UNO.
Any help you can offer would be much appreciated, thanks!

Out of curiosity have you tried using a newer version of Arduino?

On 1.6.5 I get ( Cannot run program “{runtime.tools.avr-gcc.path}\bin\avr-g++” (in directory “.”): CreateProcess error=2, The system cannot find the file specified ). The solution that I found was just to run 1.0.5 instead, but I didn’t really look around too much. Is there a fix available for avr?

Just want to check that you’re using the current version of FastLED.

Also, what pixels are you using just so we have all the info?

It sounds like you have a bad install of Arduino1.6.5, and I would recommend uninstalling and re-installing Arduino 1.6.5. Note that starting with FastLED 3.1 (what is currently in the master branch on github) I’m no longer testing/checking against Arduino 1.0.5.

You have ~1500 bytes of data being used by globals, and that’s not including anything being allocated on a heap and then there’s the memory that gets used by the call stack as you call down into functions. I wouldn’t be surprised if that’s causing problems.

Finally, the ADC interrupt wants to fire approximately once every 104µs. You are using WS2812B leds which require disabling interrupts while writing out the led data. WS2812B leds take 30µs to write out a single led, you have 56 of them which means it takes 1680µs to write out, during which time 16 ADC interrupt calls are going to be missed. I don’t know how much this is going to interfere with the fft code.

@Daniel_Garcia
It was definitely a bad install of 1.6.5, thank you! Reinstalled and also re-downloaded FastLED just to be safe, it now compiles just fine.
As for global variables eating all of my memories (which the new install informs me is a serious problem as well), I will try to address that. The arrays for LED fill information can be shuffled to progmem, off the top of my head. I’m also not entirely sure that I need the min/maxLvlAvg, perhaps they’ll be culled.
I suspect that the main culprit is the timing issue though, thank you for pointing that out.
Another visualizer thing I’ve seen ( http://blurtime.blogspot.com/2010/11/arduino-realtime-audio-spectrum.html ) does not (appear to) use interrupts, I will try to see what success I have with this knowledge and a working 1.6.5 install. I don’t need the data to be fast by any means, I will try capturing samples at the start of the loop.
Thanks @marmil and @Daniel_Garcia .

@Daniel_Garcia

Got it working, although I did end up switching to the fft library used in ( http://blurtime.blogspot.com/2010/11/arduino-realtime-audio-spectrum.html ).
My working code is here ( https://gist.github.com/ianftw/e6dd450b6461b1cabfd4 ) complete with about a kilobyte fewer global variables and a significantly less pretty way of filling LEDs. Incrementing three separate variables was causing the UNO to crash, handling it this way lets it run although I am not excited about it. I’m sure there’s a more elegant way of handling it but I am equally sure that I don’t know how.
Again, thanks for your help. I’m looking forward to getting everything packaged and putting a video up.

Hi - I’ve seen your post and I’m having challenges getting a correct version of fix_fft for the most recent arduino IDE (1.6.6). could you point me to where you found the library and if you had to do any fix to it?