0% found this document useful (0 votes)
59 views4 pages

Name: - Arshman Shahbaz ID: - F2019376001 Section: - Y1 Project: - Flame Sensor

Arshman Shahbaz is building a flame sensor project for his class. The flame sensor will light an LED and sound a buzzer when fire is detected. It connects a flame sensor, LED, buzzer, and Arduino UNO using a breadboard. The code uploaded to the Arduino reads the flame sensor input and triggers the LED and buzzer if the reading is below a threshold, signaling detected flames.

Uploaded by

Arshman Shahbaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views4 pages

Name: - Arshman Shahbaz ID: - F2019376001 Section: - Y1 Project: - Flame Sensor

Arshman Shahbaz is building a flame sensor project for his class. The flame sensor will light an LED and sound a buzzer when fire is detected. It connects a flame sensor, LED, buzzer, and Arduino UNO using a breadboard. The code uploaded to the Arduino reads the flame sensor input and triggers the LED and buzzer if the reading is below a threshold, signaling detected flames.

Uploaded by

Arshman Shahbaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Name: - Arshman Shahbaz

ID: - F2019376001
Section: - Y1
Project: - Flame sensor
Flame Sensor

Introduction
I am making Flame sensor as my Project. What it will do is that it will light up
and make sound when fire is nearby.
Components: -
 Flame sensor
 Buzzer
 LED
 Arduino UNO
 Breadboard
I connected Flame sensor’s A0 pin with Arduino UNO Analogue pin 2. Ground
pin with Ground on Arduino and + with VCC pin on Arduino UNO.

Buzzers long pin(positive) is connected with pin 11(digital on Arduino UNO)


and short pin connected with ground on Arduino UNO.
Finally, I connected LED on Arduino uno positive leg on digital pin 13 and
negative leg with ground.
This the code which I uploaded on Arduino UNO through Arduino software.
const int ledpin=13;
const int flamepin=A2;
const int buzpin=11;
const int threshold=200;
int flamesensvalue=0;
void setup() {
Serial.begin(9600);
pinMode(ledpin,OUTPUT);
pinMode(flamepin,INPUT);
pinMode(buzpin,OUTPUT);
}
void loop() {
flamesensvalue=analogRead(flamepin);
if (flamesensvalue<=threshold) {
digitalWrite(ledpin,HIGH);
tone(buzpin,100);
delay(1000);
}
else{
digitalWrite(ledpin,LOW);
noTone(buzpin);
}
}

You might also like