Remarks

ServoWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for ServoWing

Code Example

ServoWing servoWing;

public MeadowApp()
{
    Console.WriteLine("Initializng ...");

    var i2CBus = Device.CreateI2cBus(I2cBusSpeed.FastPlus);
    servoWing = new ServoWing(i2CBus);

    var servo = servoWing.GetServo(0, NamedServoConfigs.SG90);

    while (true)
    {
        Console.WriteLine("0");
        servo.RotateTo(new Angle(0, AU.Degrees));
        Thread.Sleep(1000);

        Console.WriteLine("45");
        servo.RotateTo(new Angle(45, AU.Degrees));
        Thread.Sleep(1000);

        Console.WriteLine("90");
        servo.RotateTo(new Angle(90, AU.Degrees));
        Thread.Sleep(1000);

        Console.WriteLine("135");
        servo.RotateTo(new Angle(135, AU.Degrees));
        Thread.Sleep(1000);
    }
}

Sample project(s) available on GitHub

Characteristic Locus
Inheritance System.Object > ServoWing
Namespace Meadow.Foundation.FeatherWings
Assembly ServoWing.dll

Syntax

public class ServoWing : object

Constructors

ServoWing(II2cBus, Byte, Int32, Int16)

Declaration
public ServoWing(II2cBus i2cBus, byte address = null, int frequency = 50, short portCount = null)

Parameters

Type Name Description
II2cBus i2cBus
System.Byte address
System.Int32 frequency
System.Int16 portCount

Fields

pca9685

Declaration
protected Pca9685 pca9685

Field Value

Type Description
Pca9685

Methods

GetContinuousRotatioServo(Byte, ServoConfig)

Declaration
public IContinuousRotationServo GetContinuousRotatioServo(byte portIndex, ServoConfig servoConfig)

Parameters

Type Name Description
System.Byte portIndex
ServoConfig servoConfig

Returns

Type Description
IContinuousRotationServo

GetServo(Byte, ServoConfig)

Declaration
public Servo GetServo(byte portIndex, ServoConfig servoConfig)

Parameters

Type Name Description
System.Byte portIndex
ServoConfig servoConfig

Returns

Type Description
Servo

Initialize()

Declaration
public void Initialize()