bool SetPortDutyCycle(int, int, string)
Sets the duty cycle of the specified port/pin.
Security
Trust Level Required: Full Trust
Parameters
Name | Description |
portIndex |
int The port/pin index. |
percent |
int The new duty cycle, in percent. |
deviceName |
(Optional) string The name of the device, as specified in the Config Tool. Default: null. |
Return
true, upon success.
Remarks
This is supported only by the Reserved device. Pulse Width Modulation (PWM) ports/pins can set a variable duty cycle that simulates an analog signal for certain applications. For example, controlling LED brightness.