Ready to Make Some Noise
While I was just finishing my microswitches I had in mind a problem, which had not been solved yet. I had no speaker to make my electronic keyboard work. Naturally, as I usually do when I have a problem I have no solution to I go to Mr. Shappel and ask him if he has any speakers laying around
the I can use. Funnily enough, when I asked him he gave me an old stereo that was broken and he told me to take out the speakers from the stereo and use them for my project. The stereo was old and dusty so I had to take off a lot of dust before I could start cutting any wires. Eventually, I took out all of the speakers that the stereo had and I threw away the rest. Now my next problem was getting new wires that would connect from the speakers to the breadboard because the wires the speaker originally came with weren't suitable for connecting them to the breadboard. I discarded the wires that the speaker originally had and instead I got some new wires that I could connect to the breadboard and began to solder. Thanks to the experience I already had with microswitches I was able to comfortably solder the new wires on to the speaker. Now it was time to test out the new speakers with the Arduino to see if first of all the speaker actually worked and second of all if I could control them with the Arduino. This is when I took to the internet and began to research on code that was used for speakers. After some time researching, I landed myself on a website that explained how the tone() function worked on the Arduino and a pitch.h library that would help take better control of the speaker. As a test, I decided to take some code from the internet for the Mario theme song. Right as I uploaded the code to the Arduino the speaker began to play the song and I jumped because I hadn't anticipated the speaker to play. In a sigh of both joy and relief, I had found the final piece of my puzzle.
Working with the speakers helped me utilize my research skills so that I could learn how to use them for my project and it has also helped me learn more about the Arduino language. Now I can utilize the tone() function relatively well and can work with speakers to make music. Although it might seem like a mundane way to solve a problem I solved my lack of speaker by utilizing one of my most important tools, Mr. Shappel. I was able to communicate my lack of speakers to him and this resulted in me obtaining speakers. Now it's only a matter of putting everything together and getting it all to work, which should hopefully be quick and easy.
Comments
Post a Comment