-
Greetings thanks for the great work, Button b1= Button(170, &b1Click, &b1Hold); instead of using 170 as a specific value, I want to use a range i.e. 165~175 Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Actually every value should be considered as a range:
That's from the Analog pin definition documentation. AnalogButtons(uint8_t pin, uint8_t mode, uint16_t debounce, uint8_t margin) So, if your request is to have a margin customizable for each button that will require additional memory (which I always strive to keep as low as possible). The library can easily be adapted for such corner-case, but is it worth it? |
Beta Was this translation helpful? Give feedback.
-
BTW, your |
Beta Was this translation helpful? Give feedback.
Actually every value should be considered as a range:
That's from the Analog pin definition documentation.
So, if your request is to have a margin customizable for each button that will require additional memory (which I always strive to keep as low as possible). The library can easily be adapted for such corner-case, but is it worth it?
I will accept a pull request to cover that, but only if it can be switched off via a macro so that only those needing it wil…