Hey everyone!
I’m trying to get a fleet of Pixelblazes to run patterns that distribute across each strip – each Pixelblaze powers a wicket in a croquet set and I’ve mapped each one to the right points in 3D space. I have previously been running 1D patterns on each wicket and they stayed in sync well enough for the 30 seconds I’d run them before switching. The other night I couldn’t get them all to stay in sync, and I made a couple test patterns to try to figure out what was going on:
The first:
export function beforeRender(delta) {
t1 = time(.015)
}
export function render(index) {
s = 1
v = 1
hsv(t1 > 0.5 ? 0.5 : 0, s, v)
}
The second:
var elapsed = 0;
export function beforeRender(delta) {
elapsed = (elapsed + delta) % 1000
}
export function render(index) {
s = 1
v = 1
hsv(elapsed > 500 ? 0 : .5, s, v)
}
There’s a video of these two patterns here
Notice that the patterns aren’t in sync at all. The first pattern is for the first half of the video, and if you look you can even notice that the timing is all over the place – while the pattern is supposed to be half cyan, half red, the actual time ratio shifts. The second pattern starts around halfway through, and you can see that the timing is way more consistent between Pixelblazes but they aren’t all quite in sync with each other.
Any advice for this? My next attempt is going to be to just stream pixel values straight from the same Raspberry Pi I have Firestorm running on in order to keep everyone in sync, but I’m confused why this is a problem. As an example, this video shows all the LEDs running their own 1D patterns lining up nearly perfectly, so I’m confused what’s happening.