...
Assignment 4 - Sound
New parts: Speaker, CdS photoresistor, 10k Resistor (Br, Bl, Or, Gold)
In Class:

How a speaker works.
Review Resistor Circuits:
Current Limiting, Pull Down, Voltage Divider (Potentiometer), Pull Up
See How a light sensitive resistor can create "Music":
Examples - Basic - AnalogReadSerial -Determine range of A0
Examples - Digital - TonePitchFollower- Adjust to Pin 8 - Adjust to range of A0
* 8-ohm speaker on digital pin 8 and Gnd * photoresistor on analog 0 to Gnd
* 10K resistor (brown, black, red) on analog 0 to 5v


Assignment:
Write a program (sketch) that plays a song.
Use the following as a guide:


Table of Musical Frequencies |
|
|
|
|
|
|
|
|
|
|
|
|
|
Note |
Frequency |
|
Note |
Frequency |
|
Note |
Frequency |
C |
130.82 |
|
C |
261.63 |
|
C |
523.25 |
C# |
138.59 |
|
C# |
277.18 |
|
C# |
554.37 |
D |
146.83 |
|
D |
293.66 |
|
D |
587.33 |
D# |
155.56 |
|
D# |
311.13 |
|
D# |
622.25 |
E |
164.81 |
|
E |
329.63 |
|
E |
659.26 |
F |
174.61 |
|
F |
349.23 |
|
F |
698.46 |
F# |
185 |
|
F# |
369.99 |
|
F# |
739.99 |
G |
196 |
|
G |
392 |
|
G |
783.99 |
G# |
207.65 |
|
G# |
415.3 |
|
G# |
830.61 |
A |
220 |
|
A |
440 |
|
A |
880 |
A# |
233.08 |
|
A# |
466.16 |
|
A# |
932.33 |
B |
246.94 |
|
B |
493.88 |
|
B |
987.77 |

Chromatic Scale -
Link