21. Fix floating input

The provided circuit drives GPIO_IN HIGH when SW1 is closed, but leaves the input floating when the switch opens.

Fix the circuit using a 10 kΩ resistor so that:

  • When SW1 is open, GPIO_IN = 0 V.
  • When SW1 is closed, GPIO_IN = 3.3 V.

Example test cases:

SW1Expected GPIO_IN
Open≈0 V
Closed≈3.3 V