top of page
  • Writer's pictureDinaKhalil

Class 5

For lab 5, I tried powering the speakers using the Arduino. I soldered the wires to the speaker, also soldered some wires to a potentiometer so I don’t pull out my hair every time I work with potentiometers. At the beginning, I wondered if there is a specific order for the wires specifically on the speaker, but after asking around I found that there is no order, you can place the ground wire and the +ve wire on either side.




I followed all the steps from the video on lab 5 page, and for some reason my speaker only turns on when I added “Serial.println(analogValue);” at the end of my code.

The speaker is playing useless noises now, but with adding the file pitches.h, I think I can create some kind of better and less annoying melody.




2nd Trial




In this setup, you can a slight change of sound, that is because I defined some notes from pitches.h. The reason why I had to define them at the beginning is because when I tried to add pitches.h as a library it wouldn’t let me even after saving the file and following the steps online, so I thought of defining the notes I wanted at the beginning of my code and see if it gets me anywhere.


Schematics:


Schematics of arduino attached to breadboard powering a speaker


Picture of a setup of arduino attached to breadboard powering a speaker

bottom of page