2d arrays as variables

I’m attempting to stream in pre-computed pixel values to a fleet of Pixelblazes via the WebSocket API. I’ve successfully sent pixel data out my client:

 {"setVars":{"pixels":[[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1],[0.8624999999993681,1,1]]}}

I’m getting array out of bounds errors on line 3. I started the variable watcher and it looks like it thinks that pixels is an array of number, not an array of arrays. Are arrays of arrays not supported?

Before streaming data:

After streaming data:

Take a look here

For my reply to an almost identical question.

Thank you!

all kinds of fun stuff, like broadcasting an expansion board’s data, sharing data between PBs, and things like that.

Literally exactly what I’m doing. I’m doing this in Node but I’m also looking into Chataigne, a node-based data shoveler for art installations which supports WebSockets. I don’t have need of a super fast binary protocol since each of my Pixelblazes is running < 40 pixels and I have < 500 pixels in the whole project, but I wonder how much efficiency we can squeeze out of {"setVars": { "a": ${someBase64EncodedData}}} before needing to switch to UDP

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.