Christmas Tunes and Light Show with Arduino

I programmed 5 Christmas tunes in Arduino, and also made a synchronized light show with some special effects! It plays the following tunes in sequence after each key press:

  • Jingle Bells
  • The First Noel
  • O Holy Night
  • We Three Kings
  • What Child is This

Merry Christmas!

Here is the source code if you are interested:


Parts List

I used these components from the OSEPP ARD-101 “Arduino Basics” kit I picked up at Frys.

  • Arduino Uno R3
  • R1: 10 K ohms
  • R2 – R6: 330 ohms
  • LED1, LED5: white, LED2, LED4: green, LED3: red
  • J1: Piezzo Buzzer
  • S1: Switch

How it Works


The hardware setup is very simple. Lines D3-D7 drives LEDs. D8 drives the Piezzo Buzzer. A switch is connected to D2. We connect resistors before LEDs to limit the current and prevent them from frying.



function loop()

There are two modes of operation, continuous and button press mode. If we set it to continuous mode, it keeps cycling through all the tunes automatically. The global variable continuousMode should be set to 1 for it to operate on the continuous mode.  If it is in button press mode, and we detect a key press, we play the current tune.

function playTune()

We have a global variable toneNum that keeps track of the tune being played. It cycles through 0 to 4. There are also 4 light effects available. We select a random light effect and play it before and after the tune.


3 Responses

  1. Simple Christmas tune and light show with Arduino « freetronicsblog

    [...] the circuit schematic, notes and Arduino sketch visit Rajkumar’s website. And for more, we’re on twitter and Google+, so follow [...]

  2. Martin
    Martin December 23, 2012 at 11:58 am |

    Cool project you made! I have ported it to an Attiny85 as a tiny standalone project. I needed to rewrite the program a bit due to the limitations of the attiny85.

    One question: Which tool did you use to encode the sheet music into note values and durations? And do you have more tunes already encoded?

Leave a Reply