follow

fun follow(motor: NextMotor, direction: NextMotor.Direction = Direction.FORWARD)

Configures this motor to follow another motor's behavior and align its rotation direction.

The following motor uses the provided NextMotor instance and the specified Direction to align its movements with the target motor.

Parameters

motor

The motor to follow. This motor will mimic the behavior and control mode of the provided motor.

direction

The rotation direction to use when following the target motor. Defaults to Direction.FORWARD.