-->
Page 1 of 1

Interrupt triggert for no reason (ESP01 GPIO0)

PostPosted: Wed Jul 24, 2019 5:28 am
by bitboy
Hello everyone,

i'm currently working on a project including
wifimanager
webserver
eztime
eeprom

with an ESP01 (with Relay board).

I'm using the current Arduino IDE and all Librarys are up to date.
I have added a button between GPIO0 and GND.
In the code i defined an interrupt for GPIO0 on Change and i'm using the internal pullup.
within this function it checks if the current pin state is high or low. In both cases the value of millis() is stored in a different variable.
The main loop checks the time difference and if its greater than 5000ms it runs the function for a long button press. Otherwise it calls the function for a short press.
(If neccessary i will add the code as soon as i'm home)

This works very well for one or two days and without doing anything the function for a long press is called (in my cases this function resets everything, such as wifi settings, eeprom is cleared).

any idea why this is happening? Or how can i work around?