Brainstorming: What might be helpfull to make easy to use for the people out

Brainstorming:
What might be helpfull to make #FunkyClouds easy to use for the people out there using an other matrix size than 16*16?

I wonder if it would be possible to define a second CRGB leds2 and than have a function that maps leds into leds2 in order to scale (or interpolate or filter) my leds array to a different output device linked to leds2.
pro: no need to touch any existing functions, con: have to pay RAM and fps.
Any thoughts are appreciated!

I believe Dan posted code to do exactly this a couple of weeks ago. Handles arbitrary rotation, too. I should find it and add it to the “Best of” page!

i was just posting the same thing… lol

Hi, you mean the GridMap class?

I have to confess that I’m still not able to understand/use this code.
Any hint how it could roughly look, to map leds[1616] to lets say leds2[2424]? Or maybe some democode, how the usage could look like…

Thank you, yes, that. I couldn’t find it.

And yeah, using Dan’s GridMap class is probably overkill, and the example he provided assumes that you’re also using the fancy X/Y mapping that he’s built for collections of LEDs that are NOT in an ordered grid of rows and columns, but just scattered around. So, that’s not the place to start, I agree now.

Overall, if you want the code to be workable by the largest number of people, you want to design for an 8-bit, 2K world, in which case RAM is the thing you have to watch out for all the time. Each 16x16 array of RGBs takes a whopping 768 bytes. You can have two of them, max, on your basic AVR ATmega 328 -class chips, so I’d see if you can think up a different way to do this if you want to run on those boards.

If you’re willing to say “if you want to use this cool thing, you’re going to need a bigger board”, then go for speed. A few 16x16 arrays isn’t too bad, and if you optimize the interpolation a little, I bet the speed is OK – even on 16MHz 8-bit boards.

I’m currently working on code for a 16x16 matrix that uses new Perlin/simplex noise functions, and the new color palette functions, and even with all the math going on there, it’s still clocking in faster than 30fps using an Arduino Nano (16Mhz 8-bit ATmega 328). RAM usage there is one 16x16 CRGB array for leds[], and one 16x16 uint8_t array for noise data, which I suppose I could factor out if I wanted to unroll the whole pipeline. (Hrm. Another project for another day.) Anyway, it all fits OK, and speed is OK.

Maybe the ‘basic API’ should be around an 8X8 matrix, and to output to the 16x16 you could interpolate it, filter it, scale it, zoom it, scroll it, buy it, use it, break it, fix it…

Thanks Dan, I’m sure that this is brilliant code but right now it’s beyond my capabilities to understand and use it. I need to learn more about C first…

Im hoping I can spend some time on the gridmap this week, Im fairly certain how to go about it just need to make some time

I was able to get a cool looking effect on my 8x8 matrix awhile back, here is the code I adapted from @Stefan_Petrick : http://pastebin.com/svYgatR6