-->
Page 3 of 3

Re: ESP01 MQTT OpenHAB Garage Door opener - Mostly Working

PostPosted: Fri Feb 20, 2015 9:54 am
by Lawrence_jeff
Also consider changing your button interrupt code to only trigger on up or down, not both... the way you have it now when you press a button and release you are telling it to run your function on both the transition to high and the transition back to low so even a perfect switch would still try to run it twice.

If you do this you might not need to debounce (At least I don't bother in my code and it works fine) I think the time it takes LUA to process the initial interrupt gives the button time to return to its initial state.