const byte ledPin = 13;
const byte interruptPin = 2;
volatile byte state = LOW;
int botten = 1;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(interruptPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE);
}
void loop() {
if (state)
digitalWrite(13, LOW);
else
digitalWrite(13 ,HIGH);
delay(1000);
}
void blink() {
state = !state;
}