Arduino Christmas lights you can build and test in your browser
Advanced
Or see every lesson.
- 261parts on the bench
- 31boards running now
- 1.00xreal time, on every board
Holiday lights you can test before you buy a part
Christmas lights are where a lot of people first meet addressable LEDs, and an Arduino is the friendliest way in. This page has four complete holiday builds: a star for the top of the tree, a doorbell that rings real sleigh bells, a countdown to Christmas for the front window, and a light show that follows a song across three LED strips. Every one runs in your browser right now, on the real sketch, with nothing to install.
The light show above is running on a simulated Arduino Uno. A DFPlayer Mini starts the song and the roofline, the tree and the arch step through a sequence of looks, beat by beat, until the song ends and the show starts over. Watch the Serial Monitor and you can see each cue arrive on its beat.
The four builds
Each card opens the real wiring and sketch. Press the button, ring the bell or set the clock, then make the colors your own.
Looking for something else? See every Christmas build.
A tree topper star
A ring of 16 WS2812B LEDs sits behind a star cut from card or thin plywood. It has four shows, a warm twinkle, a gold comet, a slow rainbow and a red and green chase, and one press of a button moves to the next. It is the right first build: one data wire, one button, and a sketch that draws a frame and returns.
A sleigh-bell doorbell
Press the doorbell and a speaker plays the chorus of Jingle Bells while a servo shakes a strap of real sleigh bells in time. The tune is two arrays, notes and beats, played with tone(), and the servo swings one way on each note and back on the next.
A countdown in the window
A DS3231 real-time clock keeps the date, and an eight-digit MAX7219 display counts the days, hours, minutes and seconds to Christmas morning. On the day it flashes the date, and on the 26th it starts counting to next year by itself.
A light show synced to music
A DFPlayer Mini plays the song from a microSD card, and three WS2812B strips follow a cue list written in beats. It is the most ambitious of the four, and the one that shows how synced shows actually work.
How synced light shows really work
The lights in a synced show do not listen to the music. They follow a timeline written against the song beforehand, and the show starts the song and the timeline at the same moment. From then on, the clock alone says which beat it is.
Big displays do this with a sequencer. In xLights, a free sequencer for PCs, you lay effects out on a timeline against the song’s waveform, export the result as frames, and a show player streams those frames to pixel controllers over the network while it plays the audio. That is how whole houses dance to a song.
Mokxi is not xLights, and it does not run xLights sequences. The light show here is the same idea written by hand for three strips on one Uno: a list of cues, each a beat and a look, and a sketch that works out the beat from the time since the song started. It is a good way to understand what a sequencer is doing for you, and a complete show for a window or a small porch.
The other approach is beat detection: a microphone module and a sketch that flashes on every loud moment. It works with any song and needs no sequencing, but it reacts rather than performs, so nothing can happen just before the chorus lands.
Test it in the browser first
Each build opens in the editor with its wiring on a real breadboard and its sketch in the code pane. Press Run and the firmware runs on a model of the Uno’s ATmega328P, with the LED strips, the servo, the clock and the display answering the way the parts do. Press the star’s button, ring the doorbell, or set the clock to a minute before midnight on Christmas Eve and watch the countdown turn over.
Then make it yours: your own colors on the star, your own tempo for the show, a cue that lands on your song’s drop. The sketch compiles in your browser in a second or two, and the same sketch uploads to a real Uno from the Arduino IDE.
One thing to know up front: the simulated DFPlayer makes no sound. It shows which track it is playing and how far into it, so you can check the show’s beats against the player’s clock, but the music itself is for the speaker on the porch.
Power and safety
LED strips are the part that needs the most care. They draw far more current than an Uno can supply, so give them their own 5 V supply sized for the LEDs you run, and join its ground to the Uno’s. On a long strip, feed power in at both ends so the far LEDs do not fade toward orange. Put a large capacitor across the strip’s 5 V and ground where the power comes in, and a resistor of a few hundred ohms in the data line, close to the first LED.
Use a supply made for the job and keep its mains side in its case. Outdoors, keep the supply, the Uno and every connection in a weatherproof box, and plug into an outdoor-rated outlet. Servos want their own 5 V supply too, with the grounds joined, so a jumpy servo never resets the board.
What you need to buy
Nothing, to try them. To build all four, an Uno and a breadboard cover the brains, and the rest is a short list: WS2812B strips and a 16-LED ring, a DFPlayer Mini with a microSD card and a small speaker, a DS3231 clock module, an eight-digit MAX7219 display module, a hobby servo, a strap of sleigh bells, two push buttons, a few resistors and a separate 5 V supply for the LEDs. Each project page lists its exact parts and every connection.
Build one step by step
The Build Christmas lights course takes you through all four: light a star on one data wire, ring real bells from a doorbell, count down from a real-time clock, then sync three strips to a song. Each lesson opens the real build, asks you to run it, and explains the one idea that makes it work, with a check that goes green when you have it. Start with the star and it can be on the tree tonight.
Questions
Can an Arduino control Christmas lights synced to music?
Yes, for a small show. The Arduino starts the song on a DFPlayer Mini and follows a cue list timed in beats from that moment, driving WS2812B strips. Large displays use a sequencer such as xLights and dedicated pixel controllers instead.
Does Mokxi run xLights sequences?
No. Mokxi is a browser simulator for Arduino and other boards. The light show here is a hand-written cue list in an Arduino sketch, which shows the same idea a sequencer uses at a much smaller scale.
What is the easiest Arduino Christmas project?
The tree topper star: a ring of WS2812B LEDs, one push button and a short sketch with four light shows. The sleigh-bell doorbell is a close second.
How do I power a lot of WS2812B LEDs?
From their own 5 V supply sized for the LEDs, not from the Arduino, with the grounds joined. Feed long strips at both ends, add a large capacitor where the power comes in, and keep a small resistor in the data line.
Keep going
Build this for real
Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.