Update WidGet Led inside interrupt

Hi.
In the program of my NodeMCU I read the changes in the digital inputs through an interrupt, I use the port PCF8574A, within this interrupt I tried to update the Led Widget, but causes a reset on the NodeMCU , as a solution within the interrupt I have put A flag, which I read inside void loop () and depending on if it is activated I update the Led Widget.

I would like to know if it is possible to update the Led Widget within the interrupt ???, and which is the reason why the NodeMCU is reset.

Greetings and thank you

BlackTiger.

Show us your code so we can help.

Setting flags with interrupts is the normal procedure for ESP’s, anything more is likely to reset the ESP.

Do the test in my interrupt code to cancel only the update of the Led Widget (led1.on (), led1.off ()), and the reset on NodeMCU no longer occurred, and the program worked perfectly, that’s why I am Convinced that the problem is due to the Led Widget, since within the interrupt I make calls to other functions made by me and do not give me any problems.

Greetings and thank you.

If you are making function calls of any kind in the interrupt you are asking for trouble. Well documented to simply set a flag.