I proudly present: (alpha version) https://gist.github.com/anonymous/2eb826070e108b09b8fd (use this link for code with correct spacing)

 	 	 	I proudly present:  #FunkyClouds  (alpha version)

https://gist.github.com/anonymous/2eb826070e108b09b8fd
(use this link for code with correct spacing)

It’s meant to be a visual effect API allowing people to easiely express dynamic visual ideas.

I’m excited to see you guys playing with it, developing new or modifying existing effects and than sharing the results as code and video here. I count on the swarm intelligence and the swarm play instinct and I’m looking foreward to seeing a lot of new effects and helper functions.

Instead of tutorials (which might follow) I share for now some example functions which hopefully give you an idea, how easy and short basic effects can be described now.

It’s all about the visualisation of oszillators and/or MSGEQ7 spectrum analyzer data.

The concept of FunkyClouds is, that all effects are basically rendered into a 16*16 CRGB array, no matter what output device you really use. Because of my limited programming skills that’s for now the only possibility I see to create reproducable effects which appear on every device in the same way.

There is (at the end of the code) the function RenderCustomMatrix() where you are invited to define the mapping of your own matrix – where you describe, how the data from the 1616 CRGB leds will be mapped into the CRGB leds2. If you use an 1616 you can skip this. Maybe you want to change the layout in the XY() function – it’s based on a serpentine wiring at the moment. I’m happy to support your first steps – adjusting details until you see the AutoRun() example working. I strongly recommend to read the comments in the code first.

At the moment all the code comes in one file – so you can easiely have a look what the functions do. There is also no kind of performance optimization yet – I could tell you it’s in order to keep the code readable, but the truth is my leck of abilities and time… But hey, it’s an alpha version!

Hardware requirements: For now the code is only tested on an ATmega2560 with 4kB RAM. I don’t expect it working on an Uno with 2kB. I tested it with an 8*8 matrix too and yes - it’s working - but I seriously recommend to use something bigger…

Enjoy playing and please report your experiences! Any comment is appreciated.

Stefan
https://gist.github.com/anonymous/876f908333cd95315c35

I haven’t run the code yet, but I’ve been reading through it and it looks good – and some of it looks GREAT!
Thanks for sharing it all with everyone.

Thanks Mark, it’s my pleasure! I’m arround the next days to answer questions and help solving issues which might appear.

this looks incredible! thanks for sharing!!

just gave it a quick go tonight. Looks great, using default offset.

FastLED.addLeds<WS2812B, 2, GRB>(leds, HEIGHT * 0, 100);
FastLED.addLeds<WS2812B, 14, GRB>(leds, HEIGHT * 1, 100);
FastLED.addLeds<WS2812B, 7, GRB>(leds, HEIGHT * 2, 100);
FastLED.addLeds<WS2812B, 8, GRB>(leds, HEIGHT * 3, 100);
FastLED.addLeds<WS2812B, 6, GRB>(leds, HEIGHT * 4, 100);
FastLED.addLeds<WS2812B, 20, GRB>(leds, HEIGHT * 5, 100);
FastLED.addLeds<WS2812B, 21, GRB>(leds, HEIGHT * 6, 100);
FastLED.addLeds<WS2812B, 5, GRB>(leds, HEIGHT * 7, 100);

But if I try to go up to the actual 800 it breaks at 400, as it doesnt light up the second half
FastLED.addLeds<WS2812B, 2, GRB>(leds, CUSTOM_HEIGHT * 0, 100);
FastLED.addLeds<WS2812B, 14, GRB>(leds, CUSTOM_HEIGHT * 1, 100);
FastLED.addLeds<WS2812B, 7, GRB>(leds, CUSTOM_HEIGHT * 2, 100);
FastLED.addLeds<WS2812B, 8, GRB>(leds, CUSTOM_HEIGHT * 3, 100);
FastLED.addLeds<WS2812B, 6, GRB>(leds, CUSTOM_HEIGHT * 4, 100);
FastLED.addLeds<WS2812B, 20, GRB>(leds, CUSTOM_HEIGHT * 5, 100);
FastLED.addLeds<WS2812B, 21, GRB>(leds, CUSTOM_HEIGHT * 6, 100);
FastLED.addLeds<WS2812B, 5, GRB>(leds, CUSTOM_HEIGHT * 7, 100);

I’ll do a little more digging this weekend. But using the first setup, it looks great!! (just like the funkyclouds original did).
Havent got my msgeq7 connected to the test rig yet either, but cant wait!

For the next days I’m off. Going to some area without wifi and network service. But I’ll think about, how a 100*8 mapping could look like.

Maybe something like ((168) + (168)) * 3.
(3 times upper half and lower half next to each other)

Keep in mind, that in leds every second column is reversed. Defined and changeable in XY().

as I was typing out a response, I think i understand why the second method isnt working for all the leds.

the math probably isnt doing enough to map beyond a certain number of leds using the 16x16.

but using the 1st method just repeats the pattern.

I think Friday I am going to dive into the gridmap.

Yah, I get bitten by this sometimes when I used “byte” or “uint8_t” for some kind of index… and then the project grows past 255 pixels and everything … isn’t right!

(Common symptom: everything freezes immediately. Root cause: some loop using an 8 bit counter is never reaching it’s end value of, say, 300. 200 works great. 250 works great. 300 freezes.)

Thanks for the share BTW, I’m running into a compile error for my 8x8 custom matrix:

sketch_jul08a.ino: In function ‘void RenderCustomMatrix()’:
sketch_jul08a:846: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
C:\Users\BonJurroughs\Documents\Arduino\libraries\FastLED/pixeltypes.h:675: note: candidate 1: CRGB operator/(const CRGB&, uint8_t)
sketch_jul08a.ino:846: note: candidate 2: operator/(int, int)

I bet that somewhere you have an integer constant, say, “7”. Replace it with “((uint8_t)(7))”. That help?

That did it! Now, to get my damn MSGEQ7 working…

Nothing but this from MSGEQ7:
82,74,75,79,85,85,85,
80,74,78,81,85,85,84,
75,81,85,85,84,82,74,
82,74,75,79,85,85,85,
78,75,79,85,85,84,82,
79,85,85,79,85,85,85,
74,84,80,74,75,79,85,
79,85,85,85,82,80,74,
85,85,85,82,85,85,84,
85,84,82,74,78,79,85,
82,74,75,79,85,85,85,
80,74,75,79,85,75,79,

Do I have one of those buggered Sparkfun chips?

That looks just like the noise without any audio signal. Values <100 are basically always present. You want something between 100 and 1023. Checked the wiring? Measuring the right chanel? Having a proper Audio output connected?