Brick.SetMotorPositionKP(Byte, Byte) Method

Definition

Set the motor target position KP constant If you set KP higher, the motor will be more responsive to errors in position, at the cost of perhaps overshooting and oscillating. KP slows down the motor as it approaches the target, and helps to prevent overshoot. In general, if you increase KP, you should also increase KD to keep the motor from overshooting and oscillating.

public void SetMotorPositionKP (byte port, byte kp = 25);
member this.SetMotorPositionKP : byte * byte -> unit
Public Sub SetMotorPositionKP (port As Byte, Optional kp As Byte = 25)

Parameters

port
Byte

The Motor port(s). PortA, PortB, PortC, and/or PortD.

kp
Byte

The KP constant (default 25)

Applies to