I’m trying to manually populate a 2D array to I can easily switch between color themes and patterns, but I can’t figure out how to do that for some weird reason. I’ve tried a few different syntaxes. I can create a function to populate a 1D array and call that function over and over with new values, but going to a 2D array seems to break everything.
It would be really nice if I could just write an array like this: themes = [[a,b,c],[a,b,c],[a,b,c]]
When I need to “manually” set large arrays in pixelblaze, I’ve been using a spreadsheet to manipulate and store all the data in, then use a CONCAT() fuction to create a column with
lots of array assignments like
big_array[0][0] = 4
big_array[0][1] = 2
big_array[0][2] = 3
…
then, just copy the column, and paste it into my code.
I was able to remove the matrix array in the end, I had for the RYB code, and hard code the values, but I did it the long way first, and fleshed out the matrix, and yes, it’s annoying to have one line per element, plus a loop for setup. Consider this to be a pain point, still, @wizard in using arrays. A shortcut, if not just literals, would be nice.