Is it a must that we should be doing two analog reads and discard the first one, if the code reads from multiple pins, to account for the delay in charging up the sample and hold internal cap after the multiplexer has connected to the necessary An pin?
No you only need to do this when the output impedance of your analogue voltage is significantly greater than 10K.
My impedances are very, very low, I have smoothing caps on the inputs, however I am reading from multiple analog pins in random rotation and I just read on an older thread that after the multiplexer switches to the analog pin, the analogRead() function does not wait for the internal cap to charge up.
Thinking aloud.
I am not sure of the timings involved. I think the internal cap is 14pF preceded by a random internal resistor of 10K to 100K. Worst case scenario 100K. The charge up time would then be 5 periods of 1.4us = 7us. Assuming 0 external resistance.
Does the analogRead() wait for 7us ?
From the datasheet...
The ADC is optimized for analog signals with an output impedance of approximately 10 kΩ or less. If such a source is used, the sampling time will be negligible.
Does that bring clarity?
My impedances are very, very low,
So then there is no need to read twice even with lots of random switching.
Things are easy with a low-impedance source.
However the very first analogRead() after powering up or changing the analog reference source
should discarded if it matters, because the internal reference may not have stabilized (well that's
my reading of the datasheet).