Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarter step #4

Open
jaimelaborda opened this issue Apr 23, 2018 · 3 comments
Open

Quarter step #4

jaimelaborda opened this issue Apr 23, 2018 · 3 comments

Comments

@jaimelaborda
Copy link

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!

@voneiden
Copy link
Collaborator

voneiden commented Aug 3, 2018

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.

@chris-elfpen
Copy link

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.

@chris-elfpen
Copy link

chris-elfpen commented Nov 2, 2018

This worked for me:

#ifdef ONE_STEP
// 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 }
};

#elif HALF_STEP

(edited: had my CWs and CCWs swapped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants