setPower abstract method

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

Sets the "percentage" of power the Motor should employ between -1 and 1. When powerPct is negative, the rotation will be in the backward direction.

// Set the power to  40% forwards.
await myMotor.setPower(0.4);

For more information, see Motor component.

Implementation

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