first commit

This commit is contained in:
jaksatomovic 2024-03-06 12:40:28 +01:00
commit 868b14f8c8
286 changed files with 59925 additions and 0 deletions

View file

@ -0,0 +1,39 @@
/////////////////////////////////////////////////////////////////
#include "Button2.h"
/////////////////////////////////////////////////////////////////
Button2 button;
/////////////////////////////////////////////////////////////////
byte myButtonStateHandler() {
return digitalRead(39);
}
/////////////////////////////////////////////////////////////////
void myTapHandler(Button2 &b) {
Serial.println("tap");
}
/////////////////////////////////////////////////////////////////
void setup() {
Serial.begin(9600);
delay(100);
Serial.println("\n\nCustom Buttom Test");
button.begin(VIRTUAL_PIN);
pinMode(39, INPUT_PULLUP);
button.setButtonStateFunction(myButtonStateHandler);
button.setTapHandler(myTapHandler);
}
/////////////////////////////////////////////////////////////////
void loop() {
button.loop();
}
/////////////////////////////////////////////////////////////////