Unosquare
    Show / Hide Table of Contents

    Class GpioPinServoService

    Provides a standard servo PWM service running at 50Hz. The pulse width must be 0, or a number beween 500 and 2500.

    Inheritance
    Object
    GpioPinServiceBase
    GpioPinServoService
    Inherited Members
    GpioPinServiceBase.IsAvailable
    GpioPinServiceBase.Pin
    GpioPinServiceBase.ValidateAvailable()
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unosquare.PiGpio.ManagedModel
    Syntax
    public sealed class GpioPinServoService : GpioPinServiceBase

    Fields

    PulseWidthMax

    The pulse width maximum in microseconds.

    Declaration
    public const int PulseWidthMax = 2500
    Field Value
    Type Description
    Int32

    PulseWidthMin

    The pulse width minimum in microseconds.

    Declaration
    public const int PulseWidthMin = 500
    Field Value
    Type Description
    Int32

    PulseWidthRange

    The pulse range difference in microseconds.

    Declaration
    public const int PulseWidthRange = 2000
    Field Value
    Type Description
    Int32

    Properties

    PositionPercent

    Gets or sets the pulse width as a position percent for 0.0 to 1.0. Use -1.0 to turn off the PWM pulses.

    Declaration
    public double PositionPercent { get; set; }
    Property Value
    Type Description
    Double

    PulseWidth

    Gets or sets the width of the pulse in microseconds. Value must be between 500 and 2500 microseconds. Setting to 0 will turn off the PWM.

    Declaration
    public int PulseWidth { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    ResolveAvailable()

    Resolves the availability of this service for the associated pin.

    Declaration
    protected override bool ResolveAvailable()
    Returns
    Type Description
    Boolean

    True when the service is deemed as available.

    Overrides
    GpioPinServiceBase.ResolveAvailable()

    See Also

    GpioPinServiceBase

    Comments

    Back to top Copyright © 2017-2019 Unosquare