Meadow.Foundation.Grove.HID.VibrationMotor
| VibrationMotor | |
|---|---|
| Status | |
| Source code | GitHub |
| NuGet package |
Code Example
VibrationMotor vibrationMotor;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
vibrationMotor = new VibrationMotor(Device.Pins.D13);
return Task.CompletedTask;
}
public override async Task Run()
{
for (int i = 0; i < 5; i++)
{
Resolver.Log.Info("Motor on");
vibrationMotor.IsVibrating = true;
await Task.Delay(1000);
Resolver.Log.Info("Motor off");
vibrationMotor.IsVibrating = false;
await Task.Delay(1000);
}
}
Sample project(s) available on GitHub
Wiring Example
| VibrationMotor | Meadow Pin |
|---|---|
| GND | GND |
| VCC | 3.3V |
| RX | D01 |
| TX | D00 |