Loading simulator…
A mechanical switch can create short unwanted closures. The solution uses an RC network so a very brief closure does not immediately pull GPIO_IN LOW, but a sustained closure does.
R_PULL = 10 kΩ connects GPIO_IN toward the 3.3 V supply when SW1 is open.R_FILTER = 4.7 kΩ between the switch/pull-up junction and the GPIO_IN/capacitor node, plus C1 = 1 µF from the input node to ground.SW1 closes, the charged capacitor discharges through R_FILTER with approximately . After a 0.2 ms closure, , well above 2 V.In EWsim, start with SW1 open and the input settled. Close it for 0.2 ms and check ; then repeat with a 10 ms closure and check . Experiment with a larger C1 to see the response slow.