In this unit, we will detect sound using a sound sensor. The sound sensor gives a digital output. If the sound detected by the sensor exceeds a threshold value, the output goes HIGH.
This threshold is set using an on-board potentiometer and an LM393 OpAmp IC.
First, you need to plug in the sound sensor into your breadboard. Connect the ground pin of the sensor to a GND terminal of the Arduino. Now, connect the Vin pin to the 5V bus of the Arduino, and the output pin to digital pin 2 of the Arduino.