Hackster is hosting Hackster Holidays, Finale: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Tuesday!Stream Hackster Holidays, Finale on Tuesday!
technoesolution
Published © CC BY-NC-ND

Clap Activated Light Using Arduino Nano

I'm going to make my room light clap activated using a sound sensor & Arduino Nano

IntermediateFull instructions provided1 hour560
Clap Activated Light Using Arduino Nano

Things used in this project

Hardware components

Arduino Nano
×1
Sound Sensor
×1
1-Channel Relay Module
×1
Breadboard
×1
Jumper Wires
×1
AC Load (Lamp)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Follow the circuit Diagram to connection

Code

Arduino Code

C/C++
Simply Copy the following code & upload in your Arduino IDE software.
/*
 * Hello friends welcome to  "Techno-E-Solution"
 * Here is the code for Clap activated light
 * Here is complete project making video :- https://youtu.be/oExQmnEQOUw
 */
#define Sensor 4
#define Relay 6

void setup() 
{
 Serial.begin (9600);
 pinMode (Sensor, INPUT_PULLUP);
 pinMode (Relay, OUTPUT); 
}

void loop() 
{
  int sound = digitalRead (Sensor);
  if (sound)
  {
    Serial.println ("Sound Detected");
    digitalWrite (Relay,HIGH);
  }
  else 
  {
    Serial.println ("--------");
    digitalWrite (Relay,LOW); 
  }
  delay (100);
}

Credits

technoesolution
23 projects • 15 followers
Youtuber | Electrical Engineer | Electronics Lover | Article Writer | Project Developer |

Comments