Game of Thrones Theme on Arduino
by untimony in Circuits > Audio
38160 Views, 4 Favorites, 0 Comments
Game of Thrones Theme on Arduino
Hi everyone, because I'm a big fan of GoT, I decided to make my own version of GoT Theme opening sound track. I know little about notes and beats, by following simple piano tutorial in YouTube, using Arduino pre-built functions with tones, trial and error and patience for 400+ lines code, I came up with full playing GoT theme.
Someone asked me if I can make a device that play when he/she enter his/her room and Star wars theme will play. I'm not a big fan of Star wars, that's why I choose GoT. Because I put an Infrared distance sensor, you can place this project inside your CR while pooping and sitting on you porcelain throne.haha.
HARDWARE
You'll need:
Arduino
Mini-speaker or buzzer
Infrared Sensor(logic LOW)
Wires
Working Brains
Circuit Description:
I will not provide images for the circuit 'cause it so simple
1. Pin 4 of Arduino to buzzer/mini-speaker
2. Other terminal of buzzer/mini-speaker is connected to ground of Arduino
2. Pin 6 as input for you sensor signal pin, and the other two pins is for 5v and ground
of arduino
3. And add power supply or battery on your Arduino
SOFTWARE
I'm going to fix some notes. And for now, I'll provide partial of my code. Open my uploaded txt file and upload the code on your Arduino.
Some useful info.
1. In order to create or mimic notes using microcontroller, you need to oscillate an output with define frequency.
2. Defined frequency has corresponding note, like DO-RE-MI-FA etc.
3. Arduino uses pre-built function("tone( pin# , frequency)"), this function uses timer interrupt to make an oscillating square wave.
4. Beats can apply through delay functions.
5. If some melody are repeating, use for loop.
SUPER SIMPLE project
ENJOY!!! :D