- Notifications
You must be signed in to change notification settings - Fork20
AddgetDirection()
support toModulinoKnob
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
AddgetDirection()
support toModulinoKnob
and example ⚡#34
Uh oh!
There was an error while loading.Please reload this page.
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'`) matchingthe physical button labeling.Closesarduino-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
Uh oh!
There was an error while loading.Please reload this page.
} | ||
return ret; | ||
} | ||
int16_tget() { |
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
if (res ==false) { | ||
return0; | ||
} | ||
get(buf); |
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 With commit66200f1 this PR is affected topull request is merged indirectly or is still processing updates. For this reason with commitcff95ab 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
intoarduino-libraries:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
📝 Description
This PR introduces support for detecting rotation direction in the
ModulinoKnob
class via a new method:getDirection()
returns1
for clockwise,-1
for counter-clockwise, and0
when no movement is detected (debounced).DEBOUNCE_DELAY
to avoid noisy reads.begin()
logic now initializes internal state (_lastPosition
,_lastDebounceTime
) accordingly.getDirection()
.🔁 Related Work
Fixed#9