Sound Sensor with LED


Descriptions:

Sound sensors can be used for a variety of things, one of them could be turning lights off and on by clapping. Today however we are going to use hook up the sound sensor to an array of LED lights which will beat with music, clapping or knocking.



Hardware Required:

- Arduino Board - https://goo.gl/UyGYeF
- Sound Sensor - https://goo.gl/ydI0Lp
- LED
- 220 ohm Resistors
- Mini Breadboard - https://goo.gl/jZeZC2
- Wires

Recommended site to buy the required hardware:
https://www.banggood.com/?p=CS120478587752016125

Connections :

Arduino Sound Detection Sensor
This module allows you to detect when sound has exceeded a set point you select.Sound is detected via a microphone and fed into an LM393 op amp.
The sound level set point is adjusted via an on board potentiometer. When the sound level exceeds the set point, an LED on the module is illuminated and the output is sent low.

Get the Code:
int soundSensor = 2;
int LED = 3;

void setup() 
{

  pinMode (soundSensor, INPUT);
  pinMode (LED, OUTPUT);
}

void loop()
{
  int statusSensor = digitalRead (soundSensor);
  
  if (statusSensor == 1)
  {
    digitalWrite(LED, HIGH);
  }
  
  else
  {
    digitalWrite(LED, LOW);
  }
  
}