Yet Another Arduino Button library ;-)
Important
This repo has been archived
Warning
This is mostly a personal experiment. Use at your own risk ;-)
This folder should go in your Sketchbook/libraries folder. You can do this using a symbolic link. E.g. on a Mac:
$ git clone https://github.com/christophevg/AButon
$ ln -s `pwd`/AButton ~/Documents/Arduino/libraries/
#include <AButton.h>
#define BUTTON_PIN 5
AButton button(BUTTON_PIN);
void setup() {
Serial.begin(115200);
button.on_click(&on_click);
}
void on_click() {
Serial.println("click");
}
void loop() {
delay(10);
}