Add Library

This commit is contained in:
Siwat Sirichai 2019-08-09 09:01:56 +07:00
parent e365b9dbd9
commit 3c47103b39
318 changed files with 56465 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#include <ButtonDebounce.h>
ButtonDebounce button(10, 250);
void setup() {
Serial.begin(115200);
}
void loop() {
button.update();
if(button.state() == HIGH){
Serial.println("Clicked");
}
}

View file

@ -0,0 +1,15 @@
#include <ButtonDebounce.h>
ButtonDebounce button(10, 250);
void buttonChanged(int state){
Serial.println("Changed: " + String(state));
}
void setup() {
Serial.begin(115200);
button.setCallback(buttonChanged);
}
void loop() {
button.update();
}