Add the following snippet to your HTML:
Sound Detecting Security System using Arduino uno and Sound Detector sensor
Read up about this project on
When detect any sound make a sound
You can use it to security system
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); } } }
Comments