Hello, I appreciate all the help I get here, I’m still trying to wrap my head around how to really use this library to its full potential. Basic stuff is easy for me but Right now I need something a bit more complicated. I have a matrix of 3x2, I want to do a noise pattern but I want it to use a color pallet that can be changed on the fly, blending between the old pallet and the new pallet on change. Can anyone point me in a good direction for this? matrix codes in the examples is still confusing to me and it seems to be meant for much larger matrices then what I’m dealing with and they don’t scale well.
I found and tried to make use of the code found here https://pastebin.com/r70Qk6Bn by Andrew Tuline however it isn’t scaling to the 6 LEDS and I’m not sure what I’m missing. the LEDs just stay mostly a solid color across all 6 LEDs. I’ve tried changing scal to 2, 6, 30, and 60. with no change.
I just downloaded and converted that sketch over to use my test APA102 strip and just defined 6 LED’s. The default scaling displayed lots of colours, so you might have some other issue.
Check the hardware definitions to match your strip, and if worse comes to worse, throw in some Serial.println statements, i.e. see what the value of index is. You can always use a CHSV value instead of the palette lookup to test with. i.e.:
Serial.println(index); // This should change, a lot.
leds[i] = CHSV(index, 255, 255);
I forgot to mention that the only portion of your code I used was the indexing and color from pallet portion. I don’t want to randomly switch palettes, I want one particular pattern to be displayed but the colors to randomly move through the ring I’m not sure how to describe the effect I’m after. Basically I want to take a custom palette that has yellow, orange, and red in it. fill the ring with a random color from the pallet, and blend between the colors when it changes to a different random color from the palette. While doing this I am also feeding in a brightness value that comes from a keyframe sequence in an array that is predefined. Basically to mimic a candle, I recorded 200 “keyframes” of brightness values from a real candle in to 2 arrays, one for each side of the candle. I’m splitting the ring in to two sides. so each side of the array gets its own value from its own array. but the colors for both sides should be the same and randomly blend between a set if fixed colors.