goFor abstract method
Spin the Motor the specified number of revolutions
at specified rpm
.
When rpm
or revolutions
is a negative value, the rotation will be in the backward direction.
Note: if both rpm
and revolutions
are negative, the motor will spin in the forward direction.
// Turn the motor 7.2 revolutions forward at 60 RPM.
await myMotor.goFor(60, 7.2);
For more information, see Motor component.
Implementation
Future<void> goFor(double rpm, double revolutions, {Map<String, dynamic>? extra});