//Hier wird die Library eingebunden
#include <Bounce2.h>
//Hier wird ein Objekt vom Typ Button erstellt
Bounce2::Button button = Bounce2::Button();
#define PIN 7
#define PIN_MODE INPUT_PULLUP
#define INTERNAL_IN_MS 10
int s = LOW;
int b;
void setup() {
// put your setup code here, to run once:
button.attach(PIN;PIN_MODE);
button.interval(INTERVAL_IN_MS);
button.setPressedState(LOW);
}
void loop() {
// put your main code here, to run repeatedly:
button.update();
if(button.pressed())
{
if(s == HIGH)
{
s = LOW;
}
else
{
s = HIGH;
}
digitalWrite(LED_BUILTIN,s);
}
}