get_value

AbsoluteRotaryEncoder.get_value(unit: str | None = None) AngularPosition | float | int

It gets the angular position of the target rotating object.

If a unit is set, then it converts the angular position to that unit and returns only the numerical value as float or integer.

Parameters

unitstr, optional

The unit to which convert the target angular position. If specified, it converts the angular position and returns only the numerical value as float or integer, otherwise it returns an AngularPosition. Default is None, so it returns an AngularPosition.

Returns

AngularPosition or float or int

Angular position of the target rotating object.

Raises

TypeError

If unit is not a str.