upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the YG1006 Flame Sensor. More...

Detailed Description

UPM module for the YG1006 flame sensor. It detects a flame or any other light source in the 760-1,100 nm wavelength range.

yg1006.jpg
// Instantiate a yg1006 flame sensor on digital pin D2
while (true) {
boolean val = flame.flameDetected();
if (val) {
System.out.println("Flame detected");
} else {
System.out.println("No flame detected");
}
Thread.sleep(1000);
}

Public Member Functions

synchronized void delete ()
 
 YG1006 (int pin)
 
boolean flameDetected ()
 

Constructor & Destructor Documentation

YG1006 ( int  pin)

YG1006 constructor

Parameters
pinDigital pin to use

Member Function Documentation

boolean flameDetected ( )

Determines whether a flame has been detected

Returns
True if a flame or another comparable light source has been detected

The documentation for this class was generated from the following file: