This library allows to manage a button. You can specify if the pressure is long or not. Morevoer, is possible to assign a time (in milliseconds) to consider the long press, and a specific procedure both for short and long press. For short press there is the debouncing.
To install manually this library, you can see this little guides.
- Download and extract it
- Open Arudino IDE
- Select tab
Sketch
->Include Library
->Add .ZIP Library
- Select the zip file inluded in
extras
You can select the library onInclude Library
->Button
. It will be automatically added on you project, like this:
#include <Button.h>
- Download and extract it
- Copy the
src
content in your project folder - Open the project with your IDE
- Use the preprocessor directives to add the library, like this:
#include "Button.h"
See the Wiki page for details about the use.
See the Releases page for details about the versions.
Your contribute is important for me. Don't hesitate with issues and pull requests for improving this class.
Special thanks to my cousin Marco Palladino for the help to optimize the code.