Description
Dear reader,
I believe there is an error (typo) in the online documentation of
https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/
related to the number 1024 being used wrongly, instead of 1023 which is the correct one.
In my opinion the resolution of Arduino Uno is 5 Volt / 1023 = 4.8875855 mV per unit. This value will allow us to match the reading of 1023 into 5 Volt (not more, nor less).
Let's check the consequences of what is mentioned on the online site: Arduino "will map input voltages between 0 and the operating voltage(5V or 3.3V) into integer values between 0 and 1023. On an Arduino UNO, for example, this yields a resolution between readings of: 5 volts / 1024 units or, 0.0049 volts (4.9 mV) per unit. ". So if we do the maths, it means that if one gets a reading from the Arduino of 1023, if we multiply that by the resolution of 4.9 mV, we end up with 5.0127 Volt (i.e. more than 5 Volt). This contradicts the first statement.
Can we conclude there is a typo on Arduino's online documentation of arduinoread() function?