obniz to be used
Rsponse waiting timeout in milliseconds
Static prefixedOptional context: anyThis modulates pwm with data.
Modulation can be chosen from below.
data "1" means put out the pwm with duty ratio of 50%. "0" means stop pwm. io will be 0. Interval defines the symbol baud rate. Duty is fixed at 50%.

This is useful to generate IR signal (Remote control). Frequency of 38kHz gets modulated with signals.
data array. All data[index] is 0 or 1.
Optional fn: ListenerFnOptional context: anyOptional once: booleanAdd a listener for a given event.
Optional context: anyAdd a one-time listener for a given event.
Optional context: anyRemove all listeners, or those of the specified event.
Optional event: stringRemove the listeners of a given event.
Optional fn: ListenerFnOptional context: anyOptional once: booleanThis starts a pwm on a given io. freq=1khz, duty=0% at start.
io drive and pull can be configured. See more details on [[PeripheralIO|io]]
// Javascript Example
var pwm = obniz.getFreePwm();
pwm.start({io:0}); // start pwm. output at io0
pwm.freq(1000);
pwm.duty(50);
var pwm2 = obniz.getFreePwm();
pwm2.start({io:1, drive:"open-drain", pull:"5v"});
Generated using TypeDoc
We will now generate PWM. Maximum current depends on the driving mode. See [[PeripheralIO|io]].