Skip to content

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

Open
@pandaroux007

Description

@pandaroux007

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions