Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
[...] So, you'd connect a line from your Pos. regulated power rail to the COM pin, then run a lead from the NC Pin to your MCU. This means that the switch is open and reading 0 to your MCU unless you bump something.
Those "strange or unpredicted" results that Soeren was talking about.
So in this case you'd attach your switch as I had said before, but also running from NC pin of the switch would be a fairly high ohm resistor (10K or some such) going to ground. That way, when the switch is open the input pin is pulled low (definitely) and when the switch closes on bump you get that draw from the + rail and a digital 1 signal to your MCU.