This week’s lab involved programming Arduino to take analog inputs and generate different analog outputs. The first lab focused on using the speaker as the output and using the force sensor resistors to change the frequency of the tones played.
And by adding a transistor you can make the volume of the speaker louder.
By using the library of notes and frequencies stored within Arduino, I was able to create a short musical tone by programming Arduino to play certain notes in sequence and controlling the duration of each note.
With this knowledge I can create any song just by changing the notes used and sequencing the them in the correct way. I can see a lot of application in creating musical installation with this.
The last part of the lab involved creating an simplified musical instrument with three keys that play different tones as you press. I ran into an issue because the analog inputs specified in the instructions seem to be off by one pin and thus only one of the keys played when you pressed. However, after changing the pin locations and assigning new frequencies to the keys, all three keys worked.
The second lab involved programming the Arduino to take analog input from the force sensing resistor and translate to analog output to control the speed of the servo motor.