Clap to Turn on the Lights

by alicialei0616 in Circuits > Arduino

72 Views, 0 Favorites, 0 Comments

Clap to Turn on the Lights

S__10223634.jpg
Arduino Project

Introduction

In general, we need to manually switch lights. To be more convenient, switching lights by clapping hands wherever you (are as long as you are not too far) is something I always dream of. The speaker will also ring after the clap to remind people that you call the light on. Therefore, in this Instructable project, I'll be showing how to turning six lights and one speaker by one clap.

The original project is in this link.

https://www.instructables.com/id/OPEN-THE-LIGHTS-W...

Step 1: What Will We Need?

S__10215444.jpg

Materials

1. Arduino Leonardo board x1 - Actually every kind of Arduino board is fine.

2. Arduino Microphone x1 - There are 2 different Arduino microphones. One of them has 3 pins and the other one has 4 pins. If you have the second one which has 4 pins (just like me), you can just follow the following steps for the microphone. If you have the microphone with 3 pins, you can just skip the part of the A0 pin.

3. LED lights x6 - Lights for turning on.

4. Speaker x1 - Makes a sound when the light turns on.

Step 2: Circuit Diagram

1234.jpg

For Microphone:

- Analog Output to D5

- GND = GND +(VCC) = 5V

- AO to A0

For Led:

- Long pin to D6

For Speaker:

- Positive electrode side to D11

Step3: Code

Link

You can get the code of this project in this link.

https://create.arduino.cc/editor/alicia0616/9f4eb0...