-
Notifications
You must be signed in to change notification settings - Fork 81
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
Rotary encoder - swap quadrature pins #185
Comments
Is this simply a matter of swapping the CLK/DATA pin mapping or would it be better to swap the up/down logic coming out of the decoder? Or, asked another way: The rotary encoder has an 'init' method that tells the code what GPIO pins are connected to the CLK/DATA pins of the encoder. If the physical CLK/DATA pins are reversed on a 'green' vs. 'blue' encoder, then it would be dead simple for me to add a 'invert' option and simply flip the init logic. By swapping the CLK/DATA pins it should simply reverse the operation of the encoder. But I'd like some confirmation of my interpretation of the OPs problem before I implement anything... |
The pin swapping is the way to go - the PR looks good |
From lemon64:
popeye2755 wrote:
Is it possible to reverse the way the rotary encoder works? Possibly via the options.txt file?
penfold42 wrote:
Nope - not that I can see looking through the source. It would be an easy change to implement. In the meantime can you not just swap the 2 wires ?
popeye2755 wrote:
The encoder is mounted on the PCB. It seems that there are two different types, one with a green base and one with a blue base. They work in opposite directions.
The text was updated successfully, but these errors were encountered: