Once you have the Arduino IDE working with the Feather M0 or M4 board, have the prerequisite libraries installed and can successfully compile the Ooze Master 3000 source code, then we can make some adjustments so it’s less oozy and more Wintery…
But first…if using a Feather M4 (rather than M0), see the note on the prior page about changing the pin numbers. Okay? Okay…
Near the top of the code, change the “dripColor” line like so:
uint8_t palette[][3] = { { 200, 240, 255 }, // Bluish-white };
This makes a pleasing cool white color for melting snow. Solid blue { 0, 0, 255 }
also looks good. Although red and green are traditionally “Christmas colors,” in this setting they look like blood and ectoplasm respectively, and are best reserved for Halloween.
Elsewhere, set PIXEL_PITCH
to match your LED strips:
#define PIXEL_PITCH (1.0 / 60.0) // 60 pixels/m
That’s assuming the recommended 60/m NeoPixel strip…but if you’ve got something else like 144/m or 150/m, change the value accordingly.
Next line down sets how bright the “icicles” are:
#define ICE_BRIGHTNESS 20 // 20% icycle brightness
In the default Oozemaster code, this value is 0 so we just get dribbles and no icicles. 20% looks pretty good for faint always-lit icicles, but feel free to experiment.
Then, scrolling down a bit, there’s a table with the NeoPixel strip specifications. Here’s what I’m using for the front window:
} drip[] = { // THIS TABLE CONTAINS INFO FOR UP TO 8 NEOPIXEL DRIPS { 30, 6, 0.752, 0, 0 }, // NeoPXL8 output 0: 30 pixels long, drip pauses at index 6, 0.0.752 meters above splat { 30, 10, 0.685, 0, 0 }, // NeoPXL8 output 1: 30 pixels long, pause at index 10, 0.685 meters up { 30, 9, 0.702, 0, 0 }, // NeoPXL8 output 2: etc. { 30, 11, 0.669, 0, 0 }, // NeoPXL8 output 3 { 30, 7, 0.735, 0, 0 }, // NeoPXL8 output 4 { 30, 10, 0.685, 0, 0 }, // NeoPXL8 output 5 { 30, 8, 0.719, 0, 0 }, // NeoPXL8 output 6
All the drips are 30 pixels long now, because that’s how it was built (7 half-meter lengths, 60/m).
The “dribble” pixel indices are jumbled up a bit to add variety. This also establishes the lengths of the icicles that will be always-lit by the ICE_BRIGHTNESS
value.
And the last number on each line…that’s the height, in meters, of the “dribble” pixel above the “splat” pixel down below. Not the topmost pixel, not the end of the drip, but the dribble pixel.
If measuring in inches, multiply by 0.0254 to convert to meters.
Your numbers will be different because your windows are different, that’s okay.
Fix It in Post
I accidentally soldered in my “drip” wires in the wrong order, with the longest one leading to NeoPXL8 pin 0 and the shortest to pin 6. It should have been the other way around. But I’d already buried those wires under hot glue, and the wire leading to the “splat” pixels wasn’t long enough to just physically flip that piece around.
No worries, if you make the same mistake, we can easily compensate in software.
Down toward the end of the loop()
function, look for a block of code starting like this:
if(N_DRIPS < 8) { // Do splats unless there's an 8th drip defined
Then, a few lines down, look for the set()
function call. The following change numbers the splats from 6 to 0 instead of 0 to 6:
set(7, N_DRIPS - 1 - i, x);
Alternately, this could be done by reversing the first six elements of the pins[] array.
Text editor powered by tinymce.