Control LED By Clap Using Arduino and Sound Sensor

Control LED By Clap Using Arduino and Sound Sensor

We're showing how to use KY-038 Sound Sensor using Arduino. You can control LED by clap with the help of Arduino and sound sensor.

  • 33,967 views
  • 7 comments
  • 33 respects

Components and supplies

Apps and online services

About this project

This video shows how to use KY-038 Sound Sensor using Arduino. It also shows how you can control LED by clap with the help of Arduino and Sound Sensor. We have shown only to control LED, but by using the same concept you can control any electronic device.

KY-038 Sound Sensor having 4 Pins:

  • AO – Analog Output
  • G – Ground
  • + – VCC
  • DO – Digital Output
For more info visit www.iotboys.com

For more details visit www.iotboys.com

Code

Source CodeC/C++
Source Code for Control LED using Clap
int soundSensor=2;
int LED=4;
boolean LEDStatus=false;

void setup() {
 pinMode(soundSensor,INPUT);
 pinMode(LED,OUTPUT);

}

void loop() {

  int SensorData=digitalRead(soundSensor); 
  if(SensorData==1){

    if(LEDStatus==false){
        LEDStatus=true;
        digitalWrite(LED,HIGH);
    }
    else{
        LEDStatus=false;
        digitalWrite(LED,LOW);
    }
  }
 } 

Schematics

Circuit Design
Circuit Diagram
Sound sensor connection iotboys com wiring wkfols3kjv

Comments

Similar projects you might like

Control LED Using Your Voice Command

by Team IoTBoys

  • 13,242 views
  • 3 comments
  • 21 respects

Bluetooth control led with lcd led status display real time.

Project tutorial by Youssef Sabaa

  • 17,473 views
  • 4 comments
  • 34 respects

Ambient Light Sensor Using Photo Resistor and LED Lights!

Project tutorial by DCamino

  • 3,366 views
  • 4 comments
  • 17 respects

Sound Sensor Activated LEDs with LCD for Sound Level Data!

Project tutorial by Heathen_Hacks-v2

  • 1,690 views
  • 4 comments
  • 10 respects

Control an LED with the Remote Control

Project showcase by Nicholas_N

  • 3,930 views
  • 2 comments
  • 11 respects
Add projectSign up / Login