Remarks
FlameSensor | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
FlameSensor flameSensor;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
flameSensor = new FlameSensor(Device.Pins.D13);
flameSensor.FlameDetected += (s, e) =>
{
Console.WriteLine($"fire detected: {e}");
};
return Task.CompletedTask;
}
Sample project(s) available on GitHub
Wiring Example
FlameSensor | Meadow Pin |
---|---|
GND | GND |
VCC | 3.3V |
RX | D01 |
TX | D00 |
Characteristic | Locus |
---|---|
Inheritance | System.Object > FlameSensor |
Namespace | Meadow.Foundation.Grove.Sensors.Environmental |
Assembly | FlameSensor.dll |
Syntax
public class FlameSensor : object
Constructors
FlameSensor(IDigitalInputPort)
Creates a Flame Sensor driver
Declaration
public FlameSensor(IDigitalInputPort signalPort)
Parameters
Type | Name | Description |
---|---|---|
IDigitalInputPort | signalPort |
FlameSensor(IPin)
Creates a Flame Sensor driver
Declaration
public FlameSensor(IPin inputPin)
Parameters
Type | Name | Description |
---|---|---|
IPin | inputPin |
Events
FlameDetected
Event triggered when flame source is detected
Declaration
public event EventHandler<bool> FlameDetected
Event Type
Type | Description |
---|---|
EventHandler<System.Boolean> |