Project 17 Flame Alarm Module
1.Introduction
Infrared ray is very sensitive to flame, which is the feature of flame sensor. It utilizes specific infrared receive tube to detect flame, and then converts the brightness into changed level signal.
In this project, we use graphical programming and flame sensor to control the ringing and stop of a buzzer.
2.Materials Required
KEYESTUDIO UNO Control Board *1
V5 Sensor Shield*1
Flame Sensor*1
Active Buzzer*1
Female to Female Dupont Line*3
3.Connection Diagram


4.Sample Code
int _ABVAR_1_val = 0 ;
void setup()
{
Serial.begin(9600);
pinMode( 10 , OUTPUT);
}
void loop()
{
_ABVAR_1_val = analogRead(0) ;
Serial.print("val:");
Serial.print(_ABVAR_1_val);
Serial.println();
if (( ( _ABVAR_1_val ) < ( 600 ) ))
{
digitalWrite( 10 , HIGH );
}
else
{
digitalWrite( 10 , LOW );
}
}
5.Result
After the program is downloaded, we can use flame sensor to check whether there is flame around.