Open mathieucarbou opened 10 months ago
Hi Mathieu, got all your notes. Am travelling for work atm, but will sit down in the next week or so and go through them.
Hi Mathieu, just an update, I am working on this suggested feature inclusion of yours, but I am encompassing it into a bigger update. Have modified the main constructor so that all arguments are optional, that way you can initialise as your have done with default settings and then change only the ones you want at runtime. You can also change the pin as requested.
Also adding a bit that lets you change the menu count at run time which requires tracking of all instances so taking a little time to implement that as well. Tracking will help in a few areas actually
Cheers.
Usage:
declare the button in your class:
In the begin method, initialise the button as usual. But note the use of
setPin
. Other getters are available:setPin
setPressedState
setPinMode
setLongKeyPressMS
setAutoRepeatMS
setDoubleClickMS
setDebounceUS
if you want to "release" the button:
if you want to just change the pin, the code will automatically deregister the existing interrupt handler and create a new one:
The previous behaviour is kept, which is to initialise things within the first
bind()
call.All that has been tested - I am using that in my project currently.