I’m a relative beginner using the Spark Core connected to a 10x10 LED matrix, and I want to build web pages that send each pixel RGB information to the core, so that I can then stuff like upload an image on the website and have the server send over the image to the core which then displays it on the 10x10 matrix. I don’t have a specific roadblock yet as I’m only starting - my question is whether there is a better way to do this than the one I’m describing below:
Seeing as the maximum arg size for the Spark Function is 64, I will have to repeat that call numerous times to send all the information. The strings will look something like:
“1&1:255,0,0;2:0,255,255;3:0, 255, 255…” Where 1 refers to the image ID and & is the delimiter then the rest is organized as “pixel number : red, green, blue ;”.
At the Spark Core end I’ll parse the strings into a 2D int array, with strchr(), strtok() and atoi(), which I’ll use then on the Neo Pixel library functions. I’m not sure what are the implications on memory if my 10x10 matrix grows… is this the best way to handle sending relatively large amounts of information to the Spark Core?