Count Rotations Using Absolute Encoder

Hi, so I have a sensor(abs encoder) which could tell its current position (in degrees),

by using that data, what is the most reliable way of counting the number of rotation?

Because sometimes the wheel would rotate quickly and sometimes it would rotate slowly.


Pick a spot on the encoder, like the 0 degree mark or something, and every time you see that same spot add 1 to your number of rotations.

No, that’s the whole point, its an absolute encoder and may move a lot more than one count
between reads.

You need to compare each value read with the previous value read, and it’s just crossed the boundary
add or subtract 1 from the rotations count.

Divide the circle into quadrants, and count any transitions between quadrants I and IV as passing the
boundary, any others are normal (if between adjacent quadrants), or error (if between I and III,
or between II and IV).

Alrightt thanks, will do the previous and next thing but with delay