Open jaimelaborda opened 6 years ago
Why do you need quarter steps? The state machine works as intended as long as there's one sub step between the emitted steps. The sub step acts as a debouncer and therefore without a sub step, your output will be noisy.
I have this optical rotary encoder: https://www.alliedelec.com/grayhill-61c11-01-08-02/70217116/ It has clicks, and gives me one count for every two clicks when turning slowly.
This worked for me:
// one-to-one state transition - ignore disallowed transitions const unsigned char ttable[4][4] = { // 00 01 10 11 {0x00, 0x01 | DIR_CCW, 0x02 | DIR_CW, 0x00 }, {0x00 | DIR_CW, 0x01, 0x01, 0x03 | DIR_CCW }, {0x00 | DIR_CCW, 0x02, 0x02, 0x03 | DIR_CW }, {0x03, 0x01 | DIR_CW, 0x02 | DIR_CCW, 0x03 } };
(edited: had my CWs and CCWs swapped)
Hi all,
Do this library support quarter encoder step?
Will be really handly to support this, as the library is really compact and lightweight.
Thakns for supporting!