Commit a1f6cf0e authored by Gayan Kavinda Gamlath's avatar Gayan Kavinda Gamlath 😂

Flame Update n

parent 05d6754a
...@@ -15,13 +15,13 @@ void loop() { ...@@ -15,13 +15,13 @@ void loop() {
flamesensvalue=analogRead(flamepin); /* reads analog data from flame sensor */ flamesensvalue=analogRead(flamepin); /* reads analog data from flame sensor */
if (flamesensvalue<=threshold) { /* compares reading from flame sensor with the threshold value */ if (flamesensvalue<=threshold) { /* compares reading from flame sensor with the threshold value */
digitalWrite(ledpin,HIGH); //turns on led and buzzer digitalWrite(ledpin,HIGH); /* turns on led and buzzer */
tone(buzpin,100); tone(buzpin,100);
delay(700); //stops program for 1 second delay(700); /* stops program for 1 second */
} }
else{ else{
digitalWrite(ledpin,LOW); //turns led off led and buzzer digitalWrite(ledpin,LOW); /* turns led off led and buzzer */
noTone(buzpin); noTone(buzpin); /*Buzzer alerm not alert*/
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment