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:  https://github.com/rmadhuram/ArduinoChristmasTunes

Schematic:

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

Hardware

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.

Software

Source: https://github.com/rmadhuram/ArduinoChristmasTunes/blob/master/christmas_tunes/christmas_tunes.ino

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.

– UNDER CONSTRUCTION –

3 Comments Posted in Uncategorized

3 Comments

  1. 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?

  2. Thanks Martin! Great to know you were able to get it running on Attiny85. I just used my very limited music reading knowledge and tons of patience to encode the notes :) I don’t have any more encoded. I’ll try to get some more done when I find time. In case if you encode any more, please feel free to send a github pull request. Wish you a merry Christmas!

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>