Christmas Lights

Hi All,

I am presently working on Christmas lights for my nativity set. I got led lights from a local store that requires 4.5V power. My plan is to put a few series of lights for the sky as stars, and then rest all over the nativity sets. How can I make two series of lights fade-in and fade-out and rest of the lights to follow a sequence.

Thanks

Happy Holidays

Hi Dominic

I suspect the hesitation from the crowd to answer is there's many ways to tackle this, depending on your final goals.

You're going to have to do some maths based on how many LEDs you're putting in the series to size your resistor, but then adapt the "Fading" example sketch to get them all transitioning simultaneously on one output line from your Arduino. You'll physically have them all in a series with one resister between an output and ground.

Depending on the number of individually twinkling ones you have planned, they will most simply be set up on a digital IO pin each with a resistor. Perhaps as one simple method, adapt the example sketch "Blink" to cater for the multiple LEDs in a pattern.

If you want to get adventurous, fade the series up and down in your loop and have the other stars triggered at different millis intervals to give a more random look.

Hope that's enough to get you started,
Geoff

Thanks for the reply. I tested with a single led. The sequence is like this fade-in and fade-out of 1 led, then 2 led, and then blink of all the leds.

I dont want to do them in sequence, but in parallel.

Hi,

From this new information you're in luck. That's probably even easier. Ignore the series bit I mentioned, simply adapt from the example "Fade" under "basics". You'll have multiple LEDs set-up each on their own pin so it's a bit of duplication, but it will work out fine.

All the best!