getPositionRealtime

Servo.getPositionRealtime(port, [ezbIndex])

Parameters

port Servo port to use.
ezbIndex (optional) Board index of the EZB to use.

Returns

The actual position of the servo at the specified port as a value between 1 and 180.

Description

Returns the position of the servo at the specified port. This function returns the physical position of the servo returned by the servo. This function was meant to work with servos which accept bi-directional communication (e.g. Dynamixel, LewanSoul).

  • If this function is called on a pwm servo or a servo that does not support bi-direction communication, the last set servo position will be returned 
  • If the servo being queried has a communication issue, the last set position will be returned