# 10.2 Flame

## Hardware Wiring

![Flame](/files/-LCFELLI9WW1nXpLD4pW)

## Sketch

The code can be found at [Examples\_Arduino - sensor-kit-for-arduino - \_023\_Flame - \_023\_Flame.ino](https://github.com/LongerVisionRobot/Examples_Arduino/blob/master/sensor-kit-for-arduino/_023_Flame/_023_Flame.ino).

```
int Led=13;       // Define LDE Pin
int buttonpin=3;  // Define Flame Sensor Pin
int val;          // Define Variable val
void setup()
{
  pinMode(Led,OUTPUT); // Define LED as output
  pinMode(buttonpin,INPUT); // Define flame detector as input
}
void loop()
{
  val=digitalRead(buttonpin);// Assign digitl pin's reading to val
  if(val==HIGH)   // If flame detected, LED starts flashing
  {
    digitalWrite(Led,HIGH);
  }
  else
  {
    digitalWrite(Led,LOW);
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://longer-vision-robot.gitbook.io/arduino-full-stack/10_other_sensors/023_flame.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
