Push button behaviour
Posted: 06 Apr 2021, 14:29
Hi all,
I'm still struggling with my little project (see topic viewtopic.php?f=5&t=8450) and found out that the "switch" device, when set to "Push Button Active Low" has a strange behaviour, which is most probably the root cause of my issues.
I performed some tests on GPIO-14 (D5) (pin whithout exclamation point to avoid any unexpected behaviour) of an ESP8266 board.
I ticked "Internal pullup" and set the GPIO boot state to "Input pullup" and placed a push button from D5 to the GND.
When I press the push button, I see the state of the switch ("Devices" tab) going from 1 to 0. But when I stop pressing the push button, it doesn't come back to 1 unless I press the it again.
It looks like what is called a "push button" acts like a "bistable switch" instead.
Same behaviour by desabling the software pullup and replacing it by a hardware one (10K resistor connected to 3V pin).
Any idea how to get a real push button functionality instead of a bistable one ?
Thanks!
I'm still struggling with my little project (see topic viewtopic.php?f=5&t=8450) and found out that the "switch" device, when set to "Push Button Active Low" has a strange behaviour, which is most probably the root cause of my issues.
I performed some tests on GPIO-14 (D5) (pin whithout exclamation point to avoid any unexpected behaviour) of an ESP8266 board.
I ticked "Internal pullup" and set the GPIO boot state to "Input pullup" and placed a push button from D5 to the GND.
When I press the push button, I see the state of the switch ("Devices" tab) going from 1 to 0. But when I stop pressing the push button, it doesn't come back to 1 unless I press the it again.
It looks like what is called a "push button" acts like a "bistable switch" instead.
Same behaviour by desabling the software pullup and replacing it by a hardware one (10K resistor connected to 3V pin).
Any idea how to get a real push button functionality instead of a bistable one ?
Thanks!