setRandom
PWM.setRandom(port, lowCycle, highCycle, [ezbIndex])
Parameters
port | Port to use. |
lowCycle | Inclusive lower bound on duty cycle percentage to set PWM duty cycle to. |
highCycle | Exclusive upper bound on duty cycle percentage to set PWM duty cycle to. |
ezbIndex (optional) | Board index of the EZB to get PWM duty cycle from. |
Returns
The random value that the PWM was set to.Description
Sets the PWM duty cycle percentage of the specified port to a value randomly chosen between lowCycle (inclusive) and highCycle (exclusive). lowCycle and highCycle are values between 0 and 100.