Skip to main content
2 of 2
added 27 characters in body
Bruno Ferreira
  • 4.5k
  • 2
  • 27
  • 37

Yes it would work as you described. That is called a pull-down resistor because it assures that when the contact is open the digital input is at the logic state 0 (low). Usually you can use a 10 KΩ resistor for this purpose.

Bruno Ferreira
  • 4.5k
  • 2
  • 27
  • 37