Package hw
Class IO

Public Method setPWMDutyCycle

static void setPWMDutyCycle(float dutyCycle, byte pwmPin)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Parameter Range Description
dutyCycle 0.0 ... 1.0 duty cycle in percent
pwmPin IO.PWM_0 ... IO.PWM_5 pwm pins

This method is used to adjust a duty cycle for a specified pwm pin. The default value for all other pwm pins is 0. The current duty cycle value can be obtained with the IO.getPWMCurrentDutyCycle(byte) method.

Note

Example

  IO.setPWMDutyCycle(0.5f, IO.PWM_3);

See also:

IO.getPWMCurrentDutyCycle(byte)
IO.getPWMCurrentDutyCycleResolution(byte)
IO.getPWMCurrentPeriodResolution()
IO.getPWMOnOff(byte)
IO.setPWMFrequency(int)
IO.getPWMOnOff(boolean, byte)