avdwebLibraries / avdweb_Switch

Switch library with longPress and doubleClick
http://www.avdweb.nl/arduino/hardware-interfacing/simple-switch-debouncer.html
GNU General Public License v3.0
45 stars 15 forks source link

Callback functions and example #6

Closed Martin-Laclaustra closed 6 years ago

Martin-Laclaustra commented 6 years ago

Callbacks allow for a cleaner management of button events. The code was initially shared in Dean Blackketter (@blackketter) repository at https://github.com/blackketter/Switch

Martin-Laclaustra commented 6 years ago

The credit for this code (callbacks) goes to @seanlano (https://github.com/blackketter/Switch/pull/2) Merging this pull-request is compatible with the one "add_esp_compatibility"