mathertel / OneButton

An Arduino library for using a single button for multiple purpose input.
http://www.mathertel.de/Arduino/OneButtonLibrary.aspx
Other
954 stars 230 forks source link

detach function #111

Closed bmurzabaev closed 1 year ago

bmurzabaev commented 1 year ago

Thanks for great library; very helpful! I wonder how to detach button during the execution of the program.

mathertel commented 1 year ago

There is no detach function but you can "attach" the NULL.

button.attachClick(NULL);

In the library the attached functions are called when != NULL only.