After calculating the right resistor for an 8 ohm 0.5 watts speaker, I successfully made my arduino to make sounds, finally. So I decided to make a small song box that will play the interlude of Kanye West's Runaway, originally a simple but pretty reminiscing looping piano tune, hopefully I could also add another tuner with a different speaker acting as the background beats synth tune.
Prototype for the sound box.
Final piece will be updated by Wednesday midnight.
In the end, I didn't get what I initially planned for - two speakers to play separate things, each controlled by an individual potentiometer, ultimately making the music box functioning as a primary stage of a synthesizer. Here are the issues that I've struggled with:
1 tone(); somehow not able to use more than once in the loop.
2 the speakers were way too quiet, i put two speakers in parallel as a quick fix. Is there a way to maximize the volume without using the tone() function?
3 should have designed to put a press button to start the entire piece, instead of using the usb cable as a manual switch. (will update on the weekend)
4 how to play multiple melodies in one set?
5 how to have the Arduino play its original tones and then make frequency changes? In my project I had to switch codes in between manually.
The volume of the speakers is subpar, one has to stick ears right next to it to really hear the sounds.