We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A method to determine step direction is missing and would be a great nice-to-have.
No method to get step direction.
Board: any Shields / modules used: any
int direction = encoder.getDirection(); // 1 -> forward // -1 -> backwards // 0 -> no movement
--
The text was updated successfully, but these errors were encountered:
If you would like to use it, I have edited Examples -> Basic
long oldPosition = -999; void loop() { long newPosition = myEnc.read(); int direction = 0; if (newPosition != oldPosition) { direction = (newPosition > oldPosition) ? 1 : -1; oldPosition = newPosition; Serial.println(newPosition); } }
Sorry, something went wrong.
@bwalc0 thanks for the answer. Did you take a look at the associated PR?
No branches or pull requests
Description
A method to determine step direction is missing and would be a great nice-to-have.
Steps To Reproduce Problem
No method to get step direction.
Hardware & Software
Board: any
Shields / modules used: any
Usage
Errors or Incorrect Output
--
The text was updated successfully, but these errors were encountered: