Module gonioanalysis.rotary_encoders

Transforming rotary encoder step values into degrees and vice versa.

Functions

def degree2step(angle, steps_per_revolution=1024)

Transform a rotation angle from degrees to corresponging rotary encoder steps.

def step2degree(step, steps_per_revolution=1024)

Transform a rotary encoder step count (such 54 steps) into corresponding rotation in degrees (54 * steps_per_revolution).

def to_degrees(angle_pairs)

Transform angle pairs (paired the steps of rotary encoder) to corresponding degree angle values in place.

angle_pairs List of (horizontal, vertical)