You are on page 1of 3

Project

Sound Sensing (Microphone Sensor)

 The Circuit (Parts to be used):


1.veroboard
2.connecting wires
3.arduino
4.Leds
5.microphone

 Schematic Diagram:

 Circuit Code:
 const int ledpin=13;
 const int soundpin=A2;
 const int threshold=200;
 void setup() {

 pinMode(ledpin,OUTPUT);
 pinMode(soundpin,INPUT);
 }
 void loop() {
 int soundsens=analogRead(soundpin);
 if(soundsens>=threshold) {
 digitalWrite(ledpin,HIGH);
 delay(1000);
 }
 else { digitalWrite(ledpin,LOW);
 }
 }

 Date:25 APRIL 2019


Date24-04-2019

Signature:_____

You might also like