Fire Detection Alarm Arduino and Flame Sensor
by sparkbuzzer in Circuits > Arduino
806 Views, 1 Favorites, 0 Comments
Fire Detection Alarm Arduino and Flame Sensor
In this blog I have shown you how to built fire detection alarm system using Arduino
Get the Required Components
1. Arduino Uno
2. Breadboard
3. Led for Indicator (optional)
4.buzzer
5. Jumper wires
6. USB cable
Connections
So Here, Lets Make Connections With Arduino Uno and Flame SensorConnect flame sensor
VCC = 5v
GND = Gnd
Flamse Sensor Dout = 8
Buzzer = 12
Red Led = 5
Green Led = 6
Flame Sensor Arduino Code
int flamesensor =8;int buzzer = 12;
int redled = 5;
int greenled = 6;
int flame = LOW;
void setup() {
Serial.begin(9600);
pinMode(flamesensor,INPUT);
pinMode(buzzer,OUTPUT);
pinMode(redled,OUTPUT);
pinMode(greenled,OUTPUT);
}
void loop() {
flame = digitalRead(flamesensor);
if (flame == LOW){
Serial.println("Fire Occured Please Be Safe");
digitalWrite(redled,HIGH);
digitalWrite(greenled,LOW);
; digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW)
delay(100);
}
else{
digitalWrite(redled,LOW);
digitalWrite(greenled,HIGH);
digitalWrite(buzzer,LOW);
}
}