One other think to consider is that unless you have another voltage reference (AREF) then your voltage in is your reference. So, if you tie your VIN to A0, you will always read 1023 from Analog Input 0.
One other think to consider is that unless you have another voltage reference (AREF) then your voltage in is your reference. So, if you tie your VIN to A0, you will always read 1023 from Analog Input 0.