bool SetPortDutyCycle(int, int, string)

Sets the duty cycle of the specified port/pin.


Trust Level Required: Full Trust


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.


true, upon success.


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.