Módulo Sensor de flama para Arduino, marca Keyestudio
Introducción
Este sensor de llama se puede utilizar para detectar incendios u otras luces cuya longitud de onda se encuentra en 760 nm ~ 1100 nm. En el juego de robot de lucha contra incendios, la llama juega un papel importante en la sonda, que puede usarse como los ojos del robot para encontrar la fuente de fuego.
Especificación
Voltaje de suministro: 3.3V a 5V
Rango de detección: 20 cm (4.8 V) ~ 100 cm (1 V)
Rango de ancho de banda espectral: 760 nm a 1100 nm
Temperatura de funcionamiento: -25 a 85
Interfaz: digitalCódigo de muestra:
const int flamePin = 2; // the number of the flame pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int State = 0; // variable for reading status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(flamePin, INPUT);
}
void loop(){
// read the state of the value:
State = digitalRead(flamePin);
if (State == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}Ver video del producto: https://youtu.be/ExarBTacB4g