Rotary encoder to control servo positioning

Came to think of…How to use two rotary encoders to control panandtilthat two servos, one for horizontal movement the other for vertical, lets say one degree per step. Once acceptable positions are reached to store position for later recall ? I just received my PanTiltHat and found a need for such use .

Appreciate any ideas

Carl Blyh Helsinki

I think some potentiometers would be better as they have a limited range like the pantilt hat! Rotary encoders can be turned for ever.

Potentiometers are a good idea, they’d be easier to interface with an existing analog add-on board too. Rotary encoders can be difficult to read on the Pi. I’m working on a breakout board to fix that but it’s still in the formulative stages.

Thanx for this information. I will try to get an analog add-on board, Would anyhow appreciate what kind of exissting board you have in mind? Secondly, please keep me posted on the progress on inplementing rotary encoders