Isn't the code in the example ReadAnalogVoltage wrong for an Arduino UNO Rev3, given the information in the ATmega328P datasheet (24.7 ADC Conversion Result)? If I get it right the ADC value should be divided by 1024 instead of 1023. I'm aware that this is not that important as the accuracy is only ±2LSB. I'm also aware that an ADC value of 1023 would not map to V_ref in this case but this is expected as written in the documentation
0x000 represents analog ground, and 0x3FF represents the selected reference voltage minus one LSB.
...which names each of the 1024 0.0048828125V-wide intervals with the midpoint of the interval. The plain analogRead(pin)/1024.0 represents each interval by the lower edge of the interval. The /1023.0 scheme inconsistently represents the intervals by low, high, or somewhere in-between in order to make up for the lost interval.
Another nice thing about using the midpoints of the intervals is that it helps avoid divide-by-zero complications.
Hint, "0" is a real number, is a saying I had posted on my computer for many years. It depends on the base as to how it fits in. If you count base 10 0.1.2...15 marbles or hex 1.2.3...D,E,F 16 marbles each pile will be the same, the only difference is your number base. Most people live with bast 10. Spend some time with this link: Number Systems and Bases – BetterExplained
I also like this approach the best although it is not the formula proposed in the datasheet.
Is there a possibility to change the built in examples? I think the current example is misleading a lot of people.