setRPM abstract method

Future<void> setRPM(
  1. double rpm, {
  2. Map<String, dynamic>? extra,
})

Spin the Motor indefinitely at the specified speed, in revolutions per minute. If rpm is positive, the motor will spin forwards, and if rpm is negative, the motor will spin backwards.

// Set the motor to turn backwards at 120.5 RPM.
await myMotor.setRPM(-120.5);

For more information, see Motor component.

Implementation

Future<void> setRPM(double rpm, {Map<String, dynamic>? extra});