Pushbuttons ────────────────────── 3.3 V  Expected Voltage at P21 │ ┤Pushbutton Button Pushed Voltage stable Button Released Voltage stable │     P21 ──┫   │  10 kΩ │─── Contact Bounce ────│ |─Contact Bounce─| │ 10s of milliseconds  GND ina[pin] 00110001111101000111111010101111111111 1111101100000101111110100000 ─────────────────────── PUB Time(pin) : delta | time1, time2 repeat until ina[pin] == 1 time1 := cnt repeat until ina[pin] == 0 time2 := cnt delta := time2 - time1 How can Time(pin) work correctly?