Control LED By Clap Using Arduino And Sound Sensor on November 18, 2019 Get link Facebook X Pinterest Email Other Apps Circuit Diagram: Control LED By Clap Using Arduino And Sound Sensor project details project details...... Code: 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); } } } Project Testing Video: Comments
Comments
Post a Comment