Skip to content

Mulifunctional Arduino button. Detects single, double and long pressing with debounce suppression. Very easy using.

License

Notifications You must be signed in to change notification settings

slavaza/SuperButton

Repository files navigation

SuperButton

Detects a single, double and long press the button with the suppression of the bounce of the contacts. Does not require any additional resources of the microcontroller. Uses the system timer. Very easy to use.

Using

See example for how to use the class.

constructor

SuperButton::SuperButton(pin, guardtime, doubletime, longertime); create and setup timing

constants

returns from SuperButoon::pressed() method as the event meaning

SuperButton::Press::NO event not detected

SuperButton::Press::SINGLE single pressing detected

SuperButton::Press::DOUBLE double pressing detected

SuperButton::Press::LONGER long pressing detected

method

SuperButton::pressed() returns enumerate value about detected event, need to periodically calling

You can install this library by the library manager Arduino also.

About

Mulifunctional Arduino button. Detects single, double and long pressing with debounce suppression. Very easy using.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages