Menu

Tree [0cb4a8] master /
 History

HTTPS access


File Date Author Commit
 examples 2018-06-07 slavaza slavaza [2d2cd1] initial commit
 Buttonkey.hpp 2018-06-07 slavaza slavaza [2d2cd1] initial commit
 Countdown.hpp 2018-06-07 slavaza slavaza [2d2cd1] initial commit
 LICENSE 2018-06-07 slavaza slavaza [2d2cd1] initial commit
 README.md 2018-06-07 Vyacheslav Azarov Vyacheslav Azarov [92df30] initial commit
 SuperButton.cpp 2018-06-07 slavaza slavaza [2d2cd1] initial commit
 SuperButton.hpp 2018-06-07 slavaza slavaza [2d2cd1] initial commit
 library.properties 2018-06-07 Vyacheslav Azarov Vyacheslav Azarov [678cca] Fixed hte incorrect release number

Read Me

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.