Set pin to output a square wave with a specified duty cycle.
ar - connected arduino object
pin - pin to write to.
value - duty cycle value where 0 = off, 0.5 = 50% on, 1 = always on.
a = arduino();
writePWMDutyCycle(a,'D5',0.5);
See also: arduino, writePWMVoltage.
Package: arduino