As the title says... Chat on...

User avatar
By Hanut Mathur
#38664 Hi,
I have some problems using interrupts on the board. I am using the NodeMCU dev kit with the esp12e My code is basically to control an LED from a web interface and a hardware switch in parallel i.e. any of these can be used to toggle the LED. I have connected the hardware switch to DIO1 and configured it to be an interrupt detecting both low to high and high to low level changes.
The problem is, the code works fine only sometimes.
If i reset the board, it is possible, only the webserver works. Then, after a few resets, the hardware switch starts working again. And it goes again after a reset.
Please advice.

Thanks
User avatar
By Hanut Mathur
#38944 Hi
I tried something. And it worked!
Somehow, performing a subroutine, using dofile to another lua file, works more efficiently.
Haven't had any problems so far.
I was doing this by using function call previously!