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 |