Remarks
Hcsens0040 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The HCSENS0040 is a microwave motion detector commonly found on the RCWL-0516 board. It detects relative motion using the doppler effect. It uses a single GPIO pin to notify Meadow when motion is detected.
Code Example
private Hcsens0040 sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
sensor = new Hcsens0040(Device.CreateDigitalInterruptPort(Device.Pins.D05, Meadow.Hardware.InterruptMode.EdgeBoth));
sensor.OnMotionDetected += Sensor_OnMotionDetected;
return Task.CompletedTask;
}
private void Sensor_OnMotionDetected(object sender)
{
Resolver.Log.Info($"Motion detected {DateTime.Now}");
}
Sample project(s) available on GitHub
Wiring Example
To wire a Hcsens0040 to your Meadow board, connect the following:
Hcsens0040 | Meadow Pin |
---|---|
GND | GND |
TriggerOut | D05 |
VCC | 3V3 |
Characteristic | Locus |
---|---|
Inheritance | object > Hcsens0040 |
Implements | IDisposable |
Inherited Members | object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() |
Namespace | Meadow.Foundation.Sensors.Motion |
Assembly | Hcsens0040.dll |
Syntax
public class Hcsens0040 : IDisposable
Constructors
Hcsens0040(IDigitalInterruptPort)
Create a new Parallax PIR object connected to a interrupt port
Declaration
public Hcsens0040(IDigitalInterruptPort digitalInputPort)
Parameters
Type | Name | Description |
---|---|---|
IDigitalInterruptPort | digitalInputPort |
Remarks
Hcsens0040 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The HCSENS0040 is a microwave motion detector commonly found on the RCWL-0516 board. It detects relative motion using the doppler effect. It uses a single GPIO pin to notify Meadow when motion is detected.
Code Example
private Hcsens0040 sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
sensor = new Hcsens0040(Device.CreateDigitalInterruptPort(Device.Pins.D05, Meadow.Hardware.InterruptMode.EdgeBoth));
sensor.OnMotionDetected += Sensor_OnMotionDetected;
return Task.CompletedTask;
}
private void Sensor_OnMotionDetected(object sender)
{
Resolver.Log.Info($"Motion detected {DateTime.Now}");
}
Sample project(s) available on GitHub
Wiring Example
To wire a Hcsens0040 to your Meadow board, connect the following:
Hcsens0040 | Meadow Pin |
---|---|
GND | GND |
TriggerOut | D05 |
VCC | 3V3 |
Hcsens0040(IPin)
Create a new Parallax PIR object connected to an input pin and IO Device
Declaration
public Hcsens0040(IPin inputPin)
Parameters
Type | Name | Description |
---|---|---|
IPin | inputPin | The input pin |
Remarks
Hcsens0040 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The HCSENS0040 is a microwave motion detector commonly found on the RCWL-0516 board. It detects relative motion using the doppler effect. It uses a single GPIO pin to notify Meadow when motion is detected.
Code Example
private Hcsens0040 sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
sensor = new Hcsens0040(Device.CreateDigitalInterruptPort(Device.Pins.D05, Meadow.Hardware.InterruptMode.EdgeBoth));
sensor.OnMotionDetected += Sensor_OnMotionDetected;
return Task.CompletedTask;
}
private void Sensor_OnMotionDetected(object sender)
{
Resolver.Log.Info($"Motion detected {DateTime.Now}");
}
Sample project(s) available on GitHub
Wiring Example
To wire a Hcsens0040 to your Meadow board, connect the following:
Hcsens0040 | Meadow Pin |
---|---|
GND | GND |
TriggerOut | D05 |
VCC | 3V3 |
Properties
IsDisposed
Is the object disposed
Declaration
public bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Hcsens0040 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The HCSENS0040 is a microwave motion detector commonly found on the RCWL-0516 board. It detects relative motion using the doppler effect. It uses a single GPIO pin to notify Meadow when motion is detected.
Code Example
private Hcsens0040 sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
sensor = new Hcsens0040(Device.CreateDigitalInterruptPort(Device.Pins.D05, Meadow.Hardware.InterruptMode.EdgeBoth));
sensor.OnMotionDetected += Sensor_OnMotionDetected;
return Task.CompletedTask;
}
private void Sensor_OnMotionDetected(object sender)
{
Resolver.Log.Info($"Motion detected {DateTime.Now}");
}
Sample project(s) available on GitHub
Wiring Example
To wire a Hcsens0040 to your Meadow board, connect the following:
Hcsens0040 | Meadow Pin |
---|---|
GND | GND |
TriggerOut | D05 |
VCC | 3V3 |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Remarks
Hcsens0040 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The HCSENS0040 is a microwave motion detector commonly found on the RCWL-0516 board. It detects relative motion using the doppler effect. It uses a single GPIO pin to notify Meadow when motion is detected.
Code Example
private Hcsens0040 sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
sensor = new Hcsens0040(Device.CreateDigitalInterruptPort(Device.Pins.D05, Meadow.Hardware.InterruptMode.EdgeBoth));
sensor.OnMotionDetected += Sensor_OnMotionDetected;
return Task.CompletedTask;
}
private void Sensor_OnMotionDetected(object sender)
{
Resolver.Log.Info($"Motion detected {DateTime.Now}");
}
Sample project(s) available on GitHub
Wiring Example
To wire a Hcsens0040 to your Meadow board, connect the following:
Hcsens0040 | Meadow Pin |
---|---|
GND | GND |
TriggerOut | D05 |
VCC | 3V3 |
Dispose(bool)
Dispose of the object
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Is disposing |
Remarks
Hcsens0040 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The HCSENS0040 is a microwave motion detector commonly found on the RCWL-0516 board. It detects relative motion using the doppler effect. It uses a single GPIO pin to notify Meadow when motion is detected.
Code Example
private Hcsens0040 sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
sensor = new Hcsens0040(Device.CreateDigitalInterruptPort(Device.Pins.D05, Meadow.Hardware.InterruptMode.EdgeBoth));
sensor.OnMotionDetected += Sensor_OnMotionDetected;
return Task.CompletedTask;
}
private void Sensor_OnMotionDetected(object sender)
{
Resolver.Log.Info($"Motion detected {DateTime.Now}");
}
Sample project(s) available on GitHub
Wiring Example
To wire a Hcsens0040 to your Meadow board, connect the following:
Hcsens0040 | Meadow Pin |
---|---|
GND | GND |
TriggerOut | D05 |
VCC | 3V3 |
Events
OnMotionDetected
Event raised when motion is detected
Declaration
public event Hcsens0040.MotionChange OnMotionDetected
Event Type
Type | Description |
---|---|
Hcsens0040.MotionChange |
Remarks
Hcsens0040 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
The HCSENS0040 is a microwave motion detector commonly found on the RCWL-0516 board. It detects relative motion using the doppler effect. It uses a single GPIO pin to notify Meadow when motion is detected.
Code Example
private Hcsens0040 sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
sensor = new Hcsens0040(Device.CreateDigitalInterruptPort(Device.Pins.D05, Meadow.Hardware.InterruptMode.EdgeBoth));
sensor.OnMotionDetected += Sensor_OnMotionDetected;
return Task.CompletedTask;
}
private void Sensor_OnMotionDetected(object sender)
{
Resolver.Log.Info($"Motion detected {DateTime.Now}");
}
Sample project(s) available on GitHub
Wiring Example
To wire a Hcsens0040 to your Meadow board, connect the following:
Hcsens0040 | Meadow Pin |
---|---|
GND | GND |
TriggerOut | D05 |
VCC | 3V3 |