PComp Lab with some Audio!

PComp Lab with some Audio!

In my second pcomp lab this week, I had to apply analog output to a different electrical component – a speaker. I had a slightly hard time determining if the speaker in my starter kit would work for this lab, but after talking to several people I went ahead with the piezo. This lab also started out with me using the serial monitor to get a sense of the range of the sensor I was using for the input analog value. I was slightly confused by the two photocells in parallel because there was very little difference between covering the two and not covering the two. After a while, I realized covering one would lower the analog value and covering the other would raise the analog value. (I still don’t quite understand this.) This gave me a range between 138 and 824.

Then, I wired up my board, wrote some code, and produced some ‘music’. Now, for your viewing pleasures!