The MG513-30 DC motor encdoer with QEI interface.
> rap device add --model mg513-30 --id <device-id>
Supposed <device-id> is encoder
in the following demos.
$('#encoder').getRpm(function (error, rpm) {
});
A number indicates the pulse number generated per round of the DC motor. This value is read only.
Get rotate speed of DC motor. The unit is rpm (round per minute).
The parameters of callback are (error, value), in which value is rpm.