Class GpioPinServoService
Provides a standard servo PWM service running at 50Hz. The pulse width must be 0, or a number beween 500 and 2500.
Inherited Members
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. |