Surilli
Published © LGPL

Fire Detection Using Flame Sensor and Surilli Basic M0

This sensor is used to monitor fire at home or in a workplace, and beeps the buzzer whenever fire is detected.

BeginnerFull instructions provided9 minutes250
Fire Detection Using Flame Sensor and Surilli Basic M0

Things used in this project

Hardware components

Flame Sensor
×1
Surilli Basic
Surilli Basic
×1
Breadboard (generic)
Breadboard (generic)
×1
LED (generic)
LED (generic)
×1
Buzzer
Buzzer
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Fire Detection using Flame Sensor and Surilli Basic M0

Code

Flame_Sensor_with_LED_and_Buzzer

C/C++
int sensorPin = A0; // select the input pin for the LDR
int sensorValue = 0; // variable to store the value coming from the sensor
int led = 9; // Output pin for LED
int buzzer = 12; // Output pin for Buzzer
void setup() {
// declare the ledPin and buzzer as an OUTPUT:
pinMode(led, OUTPUT);
pinMode(buzzer,OUTPUT);
SerialUSB.begin(9600);
}
void loop()
{
sensorValue = analogRead(sensorPin);
if (sensorValue < 100)
{
SerialUSB.println("Fire Detected");
SerialUSB.println("LED ON");
digitalWrite(led,HIGH);
digitalWrite(buzzer,HIGH);
delay(1000);
}
else
{
 SerialUSB.println("Fire Not Detected");
 SerialUSB.println("LED OFF");
 digitalWrite(led,LOW);
 digitalWrite(buzzer,LOW);
 delay(1000);
}
}

Credits

Surilli

Surilli

196 projects • 45 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.

Comments