The second use of PWM signals is as means to encode information. The device consuming the PWM signal will measure the width of the pulses and will behave differently for different pulse widths. The most notable example is a hobby servo motor (the kind often seen in RC toys). Those
Servos expect a PWM control signal with a frequency of 100Hz (10ms period). They decode this signal by measuring the pulse width and adjust their rotation angle accordingly. Typically, a 1ms pulse width will take the servo arm to one extreme, a 2ms pulse to the other extreme, a 1.5ms pulse to the center, etc. When controlling
Servos with the IOIO, it is not a problem to connect the PWM signal directly to the motor control wire - the servo does not draw a lot of current from this wire, unlike a DC motor.
Lesezeichen