Skip to main content

Meadow.Foundation.Grove.HID.VibrationMotor

VibrationMotor
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Grove.HID.VibrationMotor

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

VibrationMotorMeadow Pin
GNDGND
VCC3.3V
RXD01
TXD00

Class VibrationMotor

Represents a VibrationMotor

Assembly: VibrationMotor.dll
View Source
Declaration
public class VibrationMotor

Properties

IsVibrating

Gets/Sets vibration motor status

View Source
Declaration
public bool IsVibrating { get; set; }