Skip to content

Optimized library with extended functionality

Compare
Choose a tag to compare
@ShaggyDog18 ShaggyDog18 released this 22 Jan 15:03
· 16 commits to optimization since this release

Optimized the library, synced it up with the original library, release v1.5, by adding attachPressStart() function.
Major addition: multiple, more than 2 clicks detection (see new functions below).
Extended SimpleOneButton example that uses and demonstrates all library methods including new functions.
Added new functions:

  • tripleClickFunc() for multiple 3+ clicks (for 3 clicks and more)
  • getNumberClicks() to return number of multiple clicks;
  • attachPressStart() to maintain compatibility with the new release v1.5 of the parent library: fires immediately as the button is pressed down.

Enjoy!