Interface IPwmOutputController
Contract for devices that expose IPwmPort(s)
.
Assembly: Meadow.Contracts.dll
View Source
public interface IPwmOutputController : IPinController
Fields
DefaultPwmFrequency
The default PWM frequency.
View Source
public const float DefaultPwmFrequency = 100
DefaultPwmDutyCycle
The default PWM duty cycle.
View Source
public const float DefaultPwmDutyCycle = 0.5
Methods
CreatePwmPort(IPin, Frequency, float, bool)
Creates an IPwmPort on the specified pin.
View Source
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. |