Practical Technomancy
IMG_7592.jpeg

Blog

Thinking out loud

Progress: Building the test rig
2018-04-29 workbench.jpg

Here we are, about to upgrade the test rig on my workbench.

IMG_1581.jpg

Old Rig

Arduino Mega & 1-meter NeoPixel strip

The current build of witchlights-fastled.ino does not run on the Arduino Mega. It gives memory errors. I don't want to get bogged down with memory optimization at this point in the game. So I'm replacing it with an Arduino Due.

The Due I'm installing is a drop-in replacement module for the control board of the Witch Lights. That way, I'm testing on the exact hardware that will be in production.

The LED strip is a five-meter WS2812B addressible LED strip, with 30 LEDs/meter. Just like the Adafruit NeoPixel strips I used in production, except without the waterproofing. Which won't matter in my home workspace, I sincerely hope.

IMG_1588.jpg

New Rig

Arduino Due and 5-meter NeoPixel strip

And that was fast.

The test rig is in place, and the WS2812B strip works fine.

Next up is creating a new Sprite animation subclass, editing its scanner routine to map to the animation that I was working on the other day.

Speaking of which, it looks like this exported into the arduino sketch format:

//                       1234567890123456789012345678901234567890123456012345678901
strcpy(afc_timing-test, "123456788                                                 ");
strcat(afc_timing-test, "1234567888                                                ");
strcat(afc_timing-test, "  1234567888                                              ");
strcat(afc_timing-test, "     1234567888                                           ");
strcat(afc_timing-test, "       123456677888                                       ");
strcat(afc_timing-test, "        1223344556667788                                  ");
strcat(afc_timing-test, "         111122233344556667788                            ");
strcat(afc_timing-test, "              11111222233344556667788                     ");
strcat(afc_timing-test, "                   11111222333444555666788                ");
strcat(afc_timing-test, "                          1111112223344556788             ");
strcat(afc_timing-test, "                                 11111223456788           ");
strcat(afc_timing-test, "                                     11123456788          ");
strcat(afc_timing-test, "                                        1123467831        ");
strcat(afc_timing-test, "                                            12468531      ");
strcat(afc_timing-test, "                                             11386421     ");
strcat(afc_timing-test, "                                              1287543211  ");
strcat(afc_timing-test, "                                               18865432211");
strcat(afc_timing-test, "                                               886443211  ");
strcat(afc_timing-test, "                                              88765431    ");
strcat(afc_timing-test, "                                            4887654321    ");
strcat(afc_timing-test, "                                            4886421       ");
strcat(afc_timing-test, "                                            138831        ");
strcat(afc_timing-test, "                                            138831        ");
strcat(afc_timing-test, "                                            138831        ");
strcat(afc_timing-test, "                                            138831        ");
strcat(afc_timing-test, "                                            138831        ");

So that's some progress. Taking a break now.

Today's lesson

Things can look like they’re going to work really well, and then just don’t.

This is also tomorrow’s lesson.

Case in point:

Accelerate with scatter trail - first attempt 2018-04-26:

I tried to give each pixel of the trail a different acceleration curve, so that they trail behind and (later) fade out.

Mixed results. The different acceleration curves for the pixels mean that they change relative distances between each other, which reads as weird jitter.

More work needed.

Screen Shot 2018-04-26 at 12.42.37 PM.png
There really is an Adafruit tutorial for everything

As I start to look online for resources for pixel animation planning, I find one inadvertently on the Adafruit Learning Center for animating NeoPixels using bitmaps.

Which is literally, exactly what I'm trying to figure out this second. Except I'm using C++, which is an extra wrinkle. Still, really useful read.

Bless Adafruit. And I'm not just saying that because of this; I owe the Adafruit NeoPixel Uber Guide for saving me many costly learning experiences in the design of the Witch Lights.

I wonder, would it be easier to design the animation bitmap if I used the horizontal axis for time, instead of the vertical axis?

It would be an interesting scripting challenge.