Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barn53/esp8266-PushButton
Arduino library that provides debounced push button functionality on GPIO pins
https://github.com/barn53/esp8266-PushButton
Last synced: 4 months ago
JSON representation
Arduino library that provides debounced push button functionality on GPIO pins
- Host: GitHub
- URL: https://github.com/barn53/esp8266-PushButton
- Owner: barn53
- License: mit
- Created: 2019-04-29T13:52:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-19T17:03:34.000Z (almost 4 years ago)
- Last Synced: 2024-06-22T07:49:33.105Z (6 months ago)
- Language: C++
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/gerdmuller/esp8266-PushButton.svg?branch=master)](https://travis-ci.org/gerdmuller/esp8266-PushButton)
# esp8266-PushButton
## Arduino library that provides debounced push button functionality on GPIO pins.### Provide the following events:
- short press
- long press
- long hold
- double press
- triple pressOne class instance per pin.
Tested only on ESP8266.
### Usage:
````
#include
...
pb::PushButton button(D1);
...
void loop()
{
switch (button.getEvent()) {
case pb::PushButton::Event::SHORT_PRESS:
// action for short press
break;
case pb::PushButton::Event::DOUBLE_PRESS:
// action for double press
break;
...
}
````