FreeJoy-Team / FreeJoyWiki

wiki for FreeJoy project
235 stars 36 forks source link

Encoder problem #1

Closed buelldozer closed 4 years ago

buelldozer commented 4 years ago

First of all, superb project! When connecting an encoder as describe in documentation, buttons are pressed every two encoder steps and not every step.

vostrenkov commented 4 years ago

Hi, please specify which encoder do you use. Some types of encoders have 1 pulse for 2 detents (for example PEC11R-4220F-S0012 has 12 pulses for 24 detents)

buelldozer commented 4 years ago

Hi, I use Alps EC11B encoder (https://www.mouser.fr/datasheet/2/15/alps_alps-s-a0008379064-1-1733314.pdf)

vostrenkov commented 4 years ago

According to this documentation your encoder has 1 pulse per 2 detents as i mentioned before. If you need 1 pulse per detent you have to use another encoder

image

buelldozer commented 4 years ago

OK, thanks for your fast reply! Could be nice to have the feature to manage rotary encoders with twice detents, because most of low PPR encoders ( like 8) have always twice detents.

vostrenkov commented 4 years ago

You mean encoders with 2 or 4 pulses per detention?

buelldozer commented 4 years ago

yes, at least encoders with 2 pulses per detention, as they are more common

vostrenkov commented 4 years ago

This is possible

vostrenkov commented 4 years ago

v1.6.0 added new modes for encoders, so you can select encoder reading resolution