In some tutorials, like ones for the TMP36 sensor, in the code it says to use this line of code to covert the analog reading from an analog input pin to voltage:
voltage = (reading/1024) * 5
But shouldn't it be 1023 and not 1024? For example if you have 5 volts going to the pin, you would get a reading of 1023. But (1023/1024)*5 is about 4.99, not 5. So, should it be 1023 or 1024?