-
Notifications
You must be signed in to change notification settings - Fork 20
Add getDirection() support to ModulinoKnob and example β‘
#34
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
Add getDirection() support to ModulinoKnob and example β‘
#34
Conversation
Added support for character and string-based input to `isPressed()` in `ModulinoButtons`, so it now accepts both index (0β2) and letter identifiers (`'A'`, `'B'`, `'C'`) matching the physical button labeling. Closes arduino-libraries#3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contribution!
Please, take a look to my review. Minor fixes
.gitignore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this file.
It is already included in the PR #33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this file :)
this modifies doesn't add any feature to the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it.
it is already included in the PR #32
src/Modulino.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
it is already included in the PR #32
@leonardocavagnis I apologize for creating problems with the files but I had accidentally merged the changes of PR #33 into the main branch of the Modulino repository fork and when I created the branch for PR #34 the changes were automatically added.
With commit 66200f1 this PR is affected to pull request is merged indirectly or is still processing updates.
For this reason with commit cff95ab everything should be fixed correctly.
I remain waiting for further developments. Enjoy π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
3c36732
into
arduino-libraries:main
Uh oh!
There was an error while loading. Please reload this page.
π Description
This PR introduces support for detecting rotation direction in the
ModulinoKnobclass via a new method:getDirection()returns1for clockwise,-1for counter-clockwise, and0when no movement is detected (debounced).DEBOUNCE_DELAYto avoid noisy reads.begin()logic now initializes internal state (_lastPosition,_lastDebounceTime) accordingly.getDirection().π Related Work
Fixed #9