Lab 5: Piezo Speakers and I/O Coincidence
In Lab, we used the speaker to play notes. This was done in three ways: pre-fed notes, taking input from the user using the serial monitor, and taking input from the user using our sensors.
As Homework for this lab, we were asked to make an artifact which uses the different Input/Output devices we have learnt about in classes. This artifact was to be a stand-alone device i.e. both the input and the output occur on the same device, hence an Input/Output Coincidence.
In this lab, we used a Piezo Speaker as an output device. We coupled the sensors from the previous labs and the speaker from this lab to further explore the domain.
My Artifact revolved around the idea of having a portable, ready-to-use musical instrument, in this case, more like a keybaord. Using any flat object as your keyboard, you could create music.
The way it works is that the FSR senses the touch on the object. This gives the feel of the user actually pressing the keys. The Photocell is used to read the notes the user wants to play, depending on how far the user is from the device.
Click here for the video.
-
Arduino Micro-controller
-
1 Resistor (1K Ohms)
-
Wires/Bread Board
-
Sensors (FSR and Photocell)
-
Ambient light
-
Piezo Speaker
Arduino Code: