Buzzer Christmas Ornament Tutorial
In this tutorial, you'll learn how to make a Christmas tree ornament that is able to "sing" up to ten different Christmas carols. These carols are "sung" on the Buzzer Wireling and the song can be selected with the Rotary Switch Wireling. The songs can be changed at the time the device is programmed to any other set of songs too! An RGB LED Wireling can also be added if you'd like to make this project do even more.
This project doesn't necessarily have to be implemented as an ornament! As you'll see above, a small decoration can be made with the RGB LED shining through a mason jar to create a snowflake-like pattern. You can also use the hardware in a wearable application.
- Micro USB Cable
- an ornament to attach the electronics to
In order to interface with Wirelings, you'll need the appropriate number of Wireling Cables and the Wireling.h Library (You can download this from GitHub as linked, or from the Library Manager in the Arduino IDE).
The table below details which Wirelings are used on each port. The tutorials and libraries for each of these Wirelings are also included.
|Port 0||Buzzer||Buzzer||pitches.h and songs.h|
|Port 1||RGB LED||RGB LED||FastLED|
|Port 3||Rotary Switch||Rotary Switch||SX1505|
All you need to do is plug in your Wirelings to the ports specified above using Wireling Cables. (You can change these ports in the included Arduino Sketch using the Wireling.selectPort() function and changing the definitions of the analog pins to their respective ports)
NOTE: Be mindful when inserting Wireling Cables - the connector pins inside the 5-pin connectors on Wirelings can be bent when cables are inserted at an angle.
If you have not already done so, download the Buzzer Christmas Ornament Sketch and open it in the Arduino IDE.
You will need to download and install the libraries listed above for this project, excluding the pitches.h and songs.h header files which are included in the .zip file above with the sketch.
To install an Arduino library, check out our Library Installation Page.
Make the correct Tools selections for your development board. If unsure, you can double-check the Help page that mentions the Tools selections needed for any TinyCircuits processor.
Plug in the micro USB cable from your computer to the WirelingZero. Make the appropriate tools selections to upload the program to the WirelingZero.
The songs that are in the program can be changed in order and new songs can be added in their place. At the end of the songs.h file is a list of some other classic Christmas carols if you're looking to add different songs to your version of the project. Check out the Buzzer Wireling Tutorial to see how the pitch and duration for a note are determined. If you are familiar with sheet music, it isn't too difficult to transpose to these arrays and add your own songs to the project.
You can also change the number of colors the LED changes and even change those colors altogether. The interval at which the LEDs change can also be adjusted.
Once the software is operating, you can secure the electronics to your ornament of choice. Then your ornament will have new life with the addition of some lighting and sound effects!
As always, if you have any questions or feedback, feel free to email us at email@example.com.
Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it!
Thanks for making with us!