Hoping someone skilled can help point me in the right direction. I'm trying to merge the effects found here: FX with this Arduino sketch: OutsideLEDs_PublicOTA2.ino. I have the lights all set up and hung after following this tutorial: Customizable Animated LED Christmas (& Every Holiday) Lights.
For example, the snow sparkle effect:
Here is the raw code:
void loop() {
SnowSparkle(0x10, 0x10, 0x10, 20, random(100,1000));
}
void SnowSparkle(byte red, byte green, byte blue, int SparkleDelay, int SpeedDelay) {
setAll(red,green,blue);
int Pixel = random(NUM_LEDS);
setPixel(Pixel,0xff,0xff,0xff);
showStrip();
delay(SparkleDelay);
setPixel(Pixel,red,green,blue);
showStrip();
delay(SpeedDelay);
}
Here is what I would think I'd need to modify to make it play with the existing sketch:
void loop() {
SnowSparkle(0x10, 0x10, 0x10, 20, random(100,1000));
}
if (setEffect == "snowsparkle") {
void SnowSparkle(byte red, byte green, byte blue, int SparkleDelay, int SpeedDelay) {
setAll(red,green,blue);
int Pixel = random(NUM_LEDS);
setPixel(Pixel,0xff,0xff,0xff);
showStrip();
delay(SparkleDelay);
setPixel(Pixel,red,green,blue);
showStrip();
delay(SpeedDelay);
}
}
But, when added to the OutsideLEDs_PublicOTA2.ino code, it's not compiling. Also, every other LED animation function in OutsideLEDs_PublicOTA2.ino seems to reference a palette, whereas this does not... That may or may not be related to the issue.
In case it matters, my arduino is the Makerfocus D1 Mini NodeMcu (ESP8266).
Please point me in the right direction.