#define LED 18
#define BTN 32
void IRAM_ATTR GLED(){
digitalWrite(LED, !digitalRead(LED));
}
void setup() {
// initialize the PWM pin as an output
pinMode(LED,OUTPUT);
pinMode(BTN,INPUT);
attachInterrupt(BTN,GLED,RISING);
}
void loop() {
// do nothing in the loop
}