Example Code for Arduino-Flame Detection

Last revision 2026/01/24

Wiring Diagram

DFR0076_Diagram

Sample Code


    /*
     # Product: Flame sensor
     # SKU    : DFR0076
     # Description:
    */

    void setup() {
      Serial.begin(9600);
    }

    void loop() {
      int sensorValue = analogRead(A0);
      Serial.println(sensorValue);
    }

Result

When the flame sensor detects an ignition source, the change in value can be observed in the serial port.

Was this article helpful?

TOP