mathertel / RotaryEncoder

RotaryEncoder Arduino Library
Other
328 stars 107 forks source link

half step support #17

Closed cnbr-de closed 3 years ago

cnbr-de commented 4 years ago

Hi, first your library works like a charm, thank you for your nice work! Have you thought about adding support for a half-step mode? I have a rotary encoder that has not only the state "3" but also the state "0" as a latch state.

mathertel commented 3 years ago

I got such a rotary encoder in my hand so I just committed supporting these.

See third parameter in initialization:

RotaryEncoder encoder(PIN_IN1, PIN_IN2, RotaryEncoder::LatchMode::TWO03);

This will increment / decrement the rotary value on state 0 and 3.

Will be in version 1.5.0 ff