Meadow.Foundation.Grove.Sensors.Motion.VibrationSensor
VibrationSensor | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
VibrationSensor sensor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
sensor = new VibrationSensor(Device.Pins.D13);
sensor.VibrationDetected += (s, e) =>
{
Resolver.Log.Info("Motion detected");
};
return Task.CompletedTask;
}
Sample project(s) available on GitHub
Wiring Example
VibrationSensor | Meadow Pin |
---|---|
GND | GND |
VCC | 3.3V |
RX | D01 |
TX | D00 |
Class VibrationSensor
Represents a Vibration Sensor
Assembly: VibrationSensor.dll
View Source
Declaration
public class VibrationSensor
Events
VibrationDetected
Event triggered when vibration is detected
View Source
Declaration
public event EventHandler VibrationDetected
Event Type
System.EventHandler