Skip to content
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

saving some memory space and create a setter for the pin #155

Open
pandaroux007 opened this issue Nov 9, 2024 · 0 comments
Open

saving some memory space and create a setter for the pin #155

pandaroux007 opened this issue Nov 9, 2024 · 0 comments

Comments

@pandaroux007
Copy link

pandaroux007 commented Nov 9, 2024

Hi @mathertel 👋
Thank you for your fantastic work on this library 👍
I have a suggestion to save memory space: use one or more (2, 3...) bytes to store, for example, the pin of the button, like in this library (in French and outside github, sorry 🥴)
➡️ source code
➡️ how it works

Additionally maybe change the states enum type in OneButton.h from int to uint8_t (byte) and some others ? Can this be moved to a single byte as I stated above ?


And also it is possible to create a setter method to change the number of the button pin while the program is running. For example we start with pin 2 and then change it to 3 ? I don't know if it's a great idea...

(sorry for my English, i'm French and i use google translate for write 🥴)

again thanks for your job!
Sincerely,
pandaroux007

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

No branches or pull requests

1 participant