nithishmurugavenkateshmaker
Published

Flame detection alarm

Do you want your house to be guarded from fire? Then this project was made for you!

IntermediateFull instructions provided46
Flame detection alarm

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Flame Sensor
×1
Buzzer
Buzzer
×1
Jumper wires (generic)
Jumper wires (generic)
×1
LED (generic)
LED (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Autodesk TinkerCAD

Story

Read more

Schematics

Circuit Diagram

Code

Code schematics

C/C++
int buzzer = 4;
int LED = 13;
int flame_sensor = 3;
int flame_detected;

void setup()
{
  Serial.begin(9600);
  pinMode(buzzer, OUTPUT);
  pinMode(LED, OUTPUT);
  pinMode(flame_sensor, INPUT);
}

void loop()
{
  flame_detected = digitalRead(flame_sensor);
  if (flame_detected == 1)
  {
    Serial.println("Flame detected.");
    tone(buzzer,65,500);
    digitalWrite(LED, HIGH);
  }
  else
  {
    Serial.println("no fire detected");
    digitalWrite(LED, LOW);
  }
  delay(1000);
}

Credits

nithishmurugavenkateshmaker

nithishmurugavenkateshmaker

4 projects • 0 followers

Comments