Interface IPwmOutputController
Contract for devices that expose IPwmPort(s)
.
Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface IPwmOutputController : IPinController
Fields
DefaultPwmFrequency
The default PWM frequency.
View Source
Declaration
public const float DefaultPwmFrequency = 100
DefaultPwmDutyCycle
The default PWM duty cycle.
View Source
Declaration
public const float DefaultPwmDutyCycle = 0.5
Methods
CreatePwmPort(IPin, Frequency, float, bool)
Creates an IPwmPort on the specified pin.
View Source
Declaration
IPwmPort CreatePwmPort(IPin pin, Frequency frequency, float dutyCycle = 0.5, bool invert = false)
Returns
Meadow.Hardware.IPwmPort: The created PWM port.
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin on which to create the PWM port. |
Meadow.Units.Frequency | frequency | The desired frequency of the PWM signal. |
System.Single | dutyCycle | The desired duty cycle of the PWM signal. Defaults to Meadow.Hardware.IPwmOutputController.DefaultPwmDutyCycle. |
System.Boolean | invert | Specifies whether the PWM signal should be inverted. Defaults to false. |