The idea of making a music box has been on my mind for a while now that i wanted to change my whole final project idea and somehow make a cool music box with some cool features.
but then decided to make as week 8's assignment since changing the final project and finding new features to meet the requirements would take long time.
The Idea here is very basic : a phone controlled buzzer that plays different notes when buttons are pressed on the phone with an RGB LED lighting a different color for each note.
TinkerCad
9V adaptor
breadboard
Jumper Wires
Arduino Uno
220ohm Resistors
Buzzer
RGB LED
Any phone
bluetooth module
arduino bluecontrol
Arduino IDE
Preparing the circuit on TinkerCad was one of the easiests in the diploma :
Buzzer was first connected to arduino at pin 11.
RGB Led was then put on breadboard and connected to resistors.
wiring shows the output color of each pin.
The bluetooth module was then connected but since the module doesn't exist on TinkerCad I was unable to run a simulation.
Downloaded Arduino bluecontrol on my phone to connect to the bluetooth module on board.
First step of implementing this was connecting the Bluetooth module, RGB led and resistors to the breadbaord
Connecting the RGB led to Arduino Uno.
Uploading the Code THEN connecting the Bluetooth module
First Started by defining variables for the RGB led and Buzzer.
then in the Void loop set an output for each number as certain note and color.
While coding, instead of writing (char data = '0';) as it should be I didn't write the '' before and after the zero, thus the code didn't work at first and had to check the whole circuit again only to find out that the cause for this problem was the wrong definietion of the variable (data)
Since my final project is using a bluetooth module, this was really helpful since I already faced an issue that I will avoid next time and also I have a ready to use code that I will just edit its outputs to control my robotic arm