const byte ledPin = 13;
const byte intPin = 6;
volatile byte state = LOW;
void setup() {
// put your setup code here, to run once:
pinMode(ledPin, OUTPUT);
pinMode(intPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(ledPin), blink, CHANGE);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(intPin, state);
}
void blink() {
state = !state;
}