- Published: Tuesday, 10 March 2009
- Written by Digital DIY
- Hits: 7376
User interaction comes in a variety of methods, none simpler then the humble switch. Checking the status of Pins is very simple, and this basic switch example demonstrates it.
The 10K (Could be any large value) resistor is a "Pull-Down" resistor, and keeps the Pin tied to earth (0v) should the switch be open (contacts not touching). If it was not in place, the input Pin (After having a logic High value) would have residual voltage remaining, as its impedance is very high, and would falsely interpret the Pin as still having a logic High state. With the resistor in place, its brought back to 0v immediately after any switching, also known as "tied to earth."