|
When a ARDUINO analog input is being used to extend the number of available inputs, there are 2 conditions to consider that although function is the same, result in different voltages that require to be measured in the software 'sketch' of the ARDUINO code.
This is because if just a normal toggle switch is used, then when the switch is 'OFF', then the input Is 'open circuit', and the resistor 'floats' to whatever the input would be of the ARDUINO pin, which would have no voltage.
However, if the connection to the resistor is from a digital device, the input would be either HIGH or LOW, generally either 5v or 0v, in this case, the 'OFF' state makes the input resistor become in parallel with the lower resistor, so the result is a completely different voltage.
Only when both inputs are 'ON', do the voltages match.
|