Specifications
- Spectral range: 760–1100 nm.
- Operating voltage: 3.3–5.3 V.
- Operating temperature: −25°C to 85°C.
- Response time: 15 ms.
- Detection range: up to approximately 100 cm.
Overview
The flame sensor activates when an object emitting strong infrared radiation, such as an open flame, enters its field of view.
It can detect a lighter flame at a distance of up to about 30 cm. It may also be triggered falsely by other IR sources, including sunlight and infrared LEDs.
The sensor provides an analog output. Use analogRead() when working with analog readings.
Using the sensor
Connecting
The sensor uses a standard 3-pin connector and plugs into any IN port on the Trackduino controller.
Programming
The Flame block is in the Sensors block group.
| Block and generated function | Description |
|---|---|
![]() bool flame(int port) | Returns TRUE when the sensor is activated.int port: port connected to the sensor. |
Example project
Fire alarm siren
Generated code:
void setup()
{
}
void loop()
{
if (flame(IN1))
{
tone(OUT3, 1000);
delay( 1000 );
noTone(OUT1);
delay( 1000 );
tone(OUT3, 500);
delay( 1000 );
}
else
{
noTone(OUT1);
}
}

