Quote:
Originally Posted by 3DWolf
There's no current or signal flowing from ANYWHERE.
|
It's exactly as magical as radio.
The Driver Station digital inputs present essentially no load to whatever is connected to them. They respond to voltage, not current. This means that the
teeniest amount of current is capable of bringing the voltage on the pin up or down to the point where the DS sees a signal. A fingertip, a short piece of wire, or an insulated pair of pliers is perfectly capable of acting as an antenna and providing enough current from ambient electromagnetic fields to affect the DS input.
The DS is a high impedance input. If you are also using a high impedance signal source, like an open switch, it is necessary to provide an external load on the pin so that the voltage doesn't go randomly bouncing around due to those few stray electrons. A resistor to either ground or +5 volts is the proper solution. Kevin's diagram will match the closed state of the switch with a logic "1" in software. Reversing the +5 and ground connections will instead make it a logic "1" when the switch is open, if that makes more sense for your application.