Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Do you mean this (see attachment) When the switch is closed, the input of microcontroller is high or low or floating?Normally you use pull-up resistors on a micro-controller, so common to ground (as you said) and the other two via seperate pull-up's to 5V, and also connected to two micro-controller inputs - so you can check either way.
However, this is rather a waste of two input pins, connecting just one will tell you the position of the switch - using either the normally open, or normally closed, is really up to you.
bananasiong said:Do you mean this (see attachment) When the switch is closed, the input of microcontroller is high or low or floating?
Yes, I got it. Thank you.Nigel Goodwin said:That's it, the pin can only be high or low, it can't float.