Meadow.Foundation.Grove.Sensors.Motion.MiniPIRMotionSensor
MiniPIRMotionSensor | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
public override Task Initialize()
{
var miniPIRMotionSensor = new MiniPIRMotionSensor(
Device.CreateDigitalInterruptPort(
Device.Pins.D13,
InterruptMode.EdgeBoth,
ResistorMode.Disabled));
miniPIRMotionSensor.OnMotionStart += (sender) =>
{
Resolver.Log.Info($"Motion start {DateTime.Now}");
};
miniPIRMotionSensor.OnMotionEnd += (sender) =>
{
Resolver.Log.Info($"Motion end {DateTime.Now}");
};
return Task.CompletedTask;
}
Sample project(s) available on GitHub
Wiring Example
MiniPIRMotionSensor | Meadow Pin |
---|---|
GND | GND |
VCC | 3.3V |
RX | D01 |
TX | D00 |
Class MiniPIRMotionSensor
Represents a Mini PIR motion sensor
Assembly: MiniPIRMotionSensor.dll
View Source
Declaration
public class MiniPIRMotionSensor : ParallaxPir, IDisposable
Inheritance: System.Object
-> Meadow.Foundation.Sensors.Motion.ParallaxPir
Implements:
System.IDisposable
Implements
System.IDisposable