Presumably by "connected in parallel", you mean that the ends of both tracks are connected to 5 V and ground as they should be. But the wipers connect separately to the two Arduino pins.
Put a delay(5) between the two analogRead instructions.
Hi,
Try this, you will notice that the code reads each analog input twice.
This is because there is only ONE ADC, and it is multiplexed between the analog inputs.
When it switches from one to the next the ADC needs to stabilise to the new value.
Double reading and using the last value gives enough stabilisation time.
But someone who doesn't remember the name taught me that: #define x A0
occupies only one byte of memory and that:
int x = A0; or const int x = A0;
occupy 2 bytes of memory.
But I don't know if it's true.