Introduction: Hand Clap Lights Switch
Quite often you need to make a few steps in the dark before you can reach the light switch. Now with a hand clapping you could turn on the lights, effortless.
Step 1: How to Make the HW Setup:
1.Connect jumper wire #1 between 5V pinout from Arduino board and VCC pin from microphone board.
2.Connect jumper wire #2 between GND pinout from Arduino board and GND pin from microphone board.
3.Connect jumper wire #3 between A0 pinout from Arduino board and OUT pin from microphone board.
4. Plug USB cable to your computer USB port.
Step 2: How to Make the SW Setup:
1.Install Arduino IDE, from following link: https://www.arduino.cc/en/main/software
2.Click on Windows installer
3.Click on JUST DOWNLOAD
4.After download is complete, click on RUN button
5.Click on I Agree button (Arduino IDE is a free software)
6.Select all components from the list and click on Next button
7.Proceed with the installation after selecting the desired location
8.Install driver “Adafruit Industries LLC Ports”, by clicking on Install button
9.Install driver Arduino USB Driver” by clicking on Install button
10.Install driver “Linino Ports (COM&LPT)” by clicking on Install button
11.Press CLOSE button when installation is complete.
12.Download application file : Clap_switch.ino
Step 3: How to Configure Your Setup
1.After code file (“Clap_switch.ino”) has been downloaded, double click on it and press OK button to create a folder named “Clap_switch”.
2.Select type of board from Arduino IDE menu: Tools\Board: “Arduino/Genuino Uno”
3.Identify the communication port on which the Arduino board will communicate, by accessing Device Manager
4.Set communication port (identified at step 3), from Arduino IDE menu: Tools\Port : COM7
Step 4: How to Configure Your Application
•AnalogPin -> Pinout reading from Arduino header
•Index -> Counter for claps
•Threshold down -> minimum noise level
•Threshold up -> maximum noise level
3.Compile and upload software to Arduino board by clicking on Upload button.
4.Collected data can be displayed as a graph, from Arduino IDE menu: Tools\Serial Plotter
5.Collected data can be displayed as numerical values, from Arduino IDE menu: Tools\Serial Monitor