Remarks

VibrationMotor
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

VibrationMotor Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00
Characteristic Locus
Inheritance object > VibrationMotor
Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.Grove.HID
Assembly VibrationMotor.dll

Syntax

public class VibrationMotor

Constructors

VibrationMotor(IDigitalOutputPort)

Creates a VibrationMotor driver

Declaration
public VibrationMotor(IDigitalOutputPort port)

Parameters

Type Name Description
IDigitalOutputPort port

Remarks

VibrationMotor
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

VibrationMotor Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

VibrationMotor(IPin)

Creates a VibrationMotor driver

Declaration
public VibrationMotor(IPin pin)

Parameters

Type Name Description
IPin pin

Remarks

VibrationMotor
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

VibrationMotor Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00

Properties

IsVibrating

Gets/Sets vibration motor status

Declaration
public bool IsVibrating { get; set; }

Property Value

Type Description
bool

Remarks

VibrationMotor
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

VibrationMotor Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00