Skip to content

Add support for character input ('A', 'B', 'C') in isPressed() #33

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AntonioBerna
Copy link

This PR adds the ability to call isPressed() using either numeric indices (0–2) or the character/string identifiers 'A', 'B', and 'C', aligning with the button labels.

This makes user code more intuitive when referencing button inputs.

Fixes #3

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
@CLAassistant
Copy link

CLAassistant commented Apr 30, 2025

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

Add the possibility to address buttons with letters
2 participants