Skip to content

Arduino library that provides debounced push button functionality on GPIO pins

License

Notifications You must be signed in to change notification settings

barn53/esp8266-PushButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

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 press

One class instance per pin.

Tested only on ESP8266.

Usage:

#include <push_button.h>
...
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;
    ...
}

About

Arduino library that provides debounced push button functionality on GPIO pins

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages