This project uses the Oozemaster 3000 code by Phil Burgess. There's a fantastic step-by-step guide to getting the code installed here:
Ooze Master 3000 Tutorial Arduino Code
Since we're using the Feather RP2040 Scorpio, there's no need to change pin numbers -- this code will work immediately as installed.
Get your software up and running first so you'll be able to see your strips working as you build. Then, come back to this page to tweak the code and make it fit to your project.
Code Modifications
Once you've completed your build, come on back here to make the necessary tweaks and modifications to make the code work with your build.
Pixel Pitch
Near the top of the code is this line:
#define PIXEL_PITCH (1.0 / 150.0) // 150 pixels/m
This tells the code the “density” of your NeoPixel strip, in LEDs-per-meter. The default, 150.0, corresponds to the density of the ultra-skinny NeoPixel strip. The code needs to know this figure so the drippings fall at a physically plausible speed.
We are mixing and matching strip densities, so some experimentation is required. I found that the most important part of the illusion is the long vertical drip, so I set this at 60/m since that's the density of those strips. It makes the "ooze" at the top a bit slower, but I actually like the way that looks. So 60/m it is.
Colors
The Oozemaster code has been updated to allow for multiple colors on the strips. To set up your colors, look for this section:
uint8_t palette[][3] = { { 0, 255, 0 }, // Bright green ectoplasm };
As explained on this page, you can set up as many colors as you like and the code will choose randomly between them. For my dress, I wanted a subtle variety of pastel colors in the "cool" spectrum -- pale greens and blues that evoke a subtly changing waterfall. I also wanted some brightness variation so some drips are brighter than others. Here's the palette I settled on:
uint8_t palette[][3] = { { 50, 50, 50 }, // Color 0 { 60, 85, 95 }, // Color 1 { 70, 90, 100 }, // Color 2 { 80, 95, 105 }, // Color 3 { 80, 110, 170 }, // Color 4 { 80, 115, 175 }, // Color 5 { 90, 120, 180 }, // Color 6 { 120, 125, 185 }, // Color 7 { 139, 34, 6 }, // Color 8 = Blood Red };
Pixel Counts for Each Section
Look for this section a bit further down. This is where you'll tell the code how many pixels you have in each strip, and where you'd like the "ooze" to stop, the "drip" to start, and also which color(s) you want to use from the palette you just set up.
The first number is the total number of pixels in the section. The second is the pixel you'd like the "pause" to happen on. The third number is the distance from the "pause" point to the "splat" pixel on the ground, and the fourth and fifth numbers determine which color(s) each drip will use. Here's my modified code:
} drip[] = { // THIS TABLE CONTAINS INFO FOR UP TO 8 NEOPIXEL DRIPS { 44, 9, 1.143, 0, 7 }, // Left front, NeoPXL8 output 0: 44 pixels long, pause at index 9, 1.143 meters up { 57, 23, 1.244, 0, 7 }, // Middle front, NeoPXL8 output 1: 57 pixels long, drip pauses at index 23, 1.244 meters above ground, use palette colors 0-7 { 44, 9, 1.143, 0, 7 }, // Right Front NeoPXL8 output 2: etc. { 21, 8, 0.96 , 0, 7 }, // Right Back NeoPXL8 output 3 { 21, 8, 0.96 , 0, 7 }, // Left Back NeoPXL8 output 4 { 30, 8, 1.193 , 0, 7 }, // Right Side NeoPXL8 output 5 { 30, 6, 1.193, 0, 7 }, // Left Side NeoPXL8 output 6 // NeoPXL8 output 7 is normally reserved for ground splats // You CAN add an eighth drip here, but then will not get splats };
Note that we're using only colors 0–7 since I don't want the red (#8) to appear randomly. The red color will be used for Carrie Mode: the drips will change to this color when I press the button we've wired to A2-A3. I chose a blood-red color, about half brightness with a little bit of blue mixed in to keep it from looking overly happy and bright.
If you're using Carrie Mode, also be sure to un-comment the two lines near the top and be sure your switch pin numbers match your wiring:
#define CARRIE_PIN A2 #define CARRIE_GROUND A3
Splat Map
To make our wiring easier, the code gives us the ability to sew in a whole NeoPixel strand and then choose which pixel lights up in association with each drip. Look for this line:
uint8_t splatmap[] = { 1, 19, 17, 7, 11, 4, 15 };
I hung my dress on a mannequin and counted out the pixels, choosing the one on the "splat" strip that best aligned with each "drip". Change this line to assign the correct pixel to each drip, in the order the drips are soldered to the board.
Splat Fade Timing
The "splat" pixels at the bottom are not quite as obvious as I'd like with the code as-written -- they disappear too fast. If you want them to hang around a little longer, look for this around line 239 in the code:
drip[i].splatDurationUsec = random(900000, 1100000);
This chooses a random number between 90-110 milliseconds, after which the drip will fade. To keep it on longer, you can change these numbers to something bigger. I wanted them to stay on for between 6-8 seconds so I changed the line to read:
drip[i].splatDurationUsec = random(6000000, 8000000);
Text editor powered by tinymce.