Feeding analog voltages to digital microcontroller inputs already got us some interesting effects, but what about leaving an input pin entirely disconnected? All of a sudden microcontrollers become sensitive to the weather outside, and the clothes we wear—or any other source of electrostatic.
The easy way to deal with this is to always ensure that an input is always fed a proper input voltage. But if we want to use a “single throw” (or “connect—disconnect”) type of switch or pushbutton, then we have to use a simple, high value resistor as a “pull-up” or “pull-down” resistor.
Continue reading