I have a Makershed brand Arduino Uno R3 that is, I think, malfunctioning.
When use analogRead on a single input pin, all other pins read at the same time.
For instance, if I plug a pot into A0 and analogRead A0 and A1, I will get the same result for both pins as i sweep the pot.
This doesn't appear to be happening on a different Arduino of the same make.
Anybody know what's up?
The A/D converter uses a capacitor to store the voltage being measured. If nothing is connected to an analog input the charge on the capacitor doesn't change and it will keep the value of the previous input. The impedance of the analog input should be 10K or lower for the analog input to work properly. For higher impedance inputs you can try reading twice and throwing out the first value. That gives the capacitor more time to charge/discharge. For very low impedance inputs you can use an op-amp as a voltage follower.