Hi guys, I've reached a point where I can push code to the cube reliably. However the tests don't seem to work as I expect.
When I run the fireworks code: https://github.com/enjrolas/Cubetube-Library/blob/master/fireworks.ino
No problems, works perfectly.
However I pushed a very simple demo of my own:
Cube cube = Cube();
int test1(String command);
int test1(String command)
int val = rand()%4;
if( val == 0)
else if (val == 1)
else if (val == 2)
else if (val == 3)
The function test1 registers correctly with Particle. I hit the the rest api and it DOES change the cube color.
However, after the first call, the cube's leds get "stuck", the first 6 planes stay the same color, and only a few leds near the back update.
Here's a video of what's happening:
I just don't understand how the led's are getting stuck in my demo but not the fireworks demo (which runs fine indefinitely).
Maybe the cube.background code is wrong?
This is most definately an issue with bad contacts in those strips (not discarding the possibility that some might even be defective) - You can debug this by disassembling the top part of your cube's plexiglass enclosure (including removing those horizontal plexiglas strips that keep the LED columns aligned vertically), then gently wiggling the strips one by one (with the cube on and running some demo) making sure they're all pressed down firmly (not with force). If this is due to some bad connections between the strips and their respective sockets, you should notice the changes immediately after hitting the "loose" one.
If nothing changes, replace the strips with the spares you got in your kit - start working backwards starting from the first defective strip immediately after the one that's perfectly lit.
This is almost certainly related to your other reported issue as well. Once you're able to figure this out you won't have any more problems.