martin-ger / esp_mqtt

MQTT Broker/Bridge on the ESP8266
MIT License
293 stars 68 forks source link

Interrupts #26

Closed msillano closed 6 years ago

msillano commented 6 years ago

Sorry, i have more problems. The script.sonoff works well. But if I add the fallowing code to enable a switch on GPIO 14

% The remote switch
on gpio_interrupt 14 nopullup
do
  println "New state GPIO 14: " | $this_gpio

The GPIO 0 (on board button) ceases to work. But GPIO 14 works. Strange. Some limit on Interrupt use? Best regards. Marco

martin-ger commented 6 years ago

Marco, thanks for the report.

Obviously, I missunderstood the easygpio_attachInterrupt() API. There is no individual user_arg for each attach - only the last will be handed over to any GPIO interrupt.

Changed the logic for identifying the interrupt source. Think, I works now.

msillano commented 6 years ago

Thanks Martin Best Regards Marco