setPower

open fun setPower(power: Double)

Set the power level of the motor, which will be passed through a SmoothDamp function defined by the motor's ramping parameters. This function must be called periodically (e.g. constantly during an activeLoop) to update the motor's power level, as it relies on the time since the last call to calculate the new power level.

Parameters

power

the new power level of the motor, a value in the interval [-1.0, 1.0]