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.

  • 156,373 views
  • 39 comments
  • 91 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

  • 50,537 views
  • 4 comments
  • 36 respects

Security Access Using RFID Reader

by Aritro Mukherjee

  • 473,081 views
  • 71 comments
  • 499 respects

Simple Programmable Robotic Arm

Project showcase by Ryan Chan

  • 165,450 views
  • 110 comments
  • 378 respects

Ambient Light Sensor Using Photo Resistor and LED Lights!

Project tutorial by DCamino

  • 54,445 views
  • 10 comments
  • 38 respects

Bluetooth control led with lcd led status display real time.

Project tutorial by Youssef Sabaa

  • 41,093 views
  • 9 comments
  • 59 respects

Servo Control with TV Remote Control

Project showcase by eldo85

  • 23,442 views
  • 8 comments
  • 46 respects
Add projectSign up / Login