I need to measure voltages at 2 points on a circuit for calculating temperatures using RTD's. For this I have used UNO board and connected pins 0,1,2,3 to the different points on the circuit (pin 0 to source and pin 3 to ground). From multimeter, I got voltage readings as V0: 4.9V, V1:3.2V, V2:1.5V and V3:0V. I got the readings from the UNO board as 1023, 659, 293 and 0 respectively.
But when I add an analog shield on the UNO to increase the accuracy I was not getting proper readings from it. Analog shield is returning the readings as 45934, 45976, 46055 and 45921 for the voltages 4.9V, 3.2V, 1.5V and 0V respectively. Following is the code I was using to get the readings from the analog shield.
void getTemp (float *t)
unsigned int V0,V1,V2,V3;
V0 = analog.read(0);
V1 = analog.read(1);
V2 = analog.read(2);
V3 = analog.read(3);
t = V0; t = V1; t = V2; t = V3;
Serial.print(temp); Serial.print(" V0 ");
Serial.print(temp); Serial.print(" V1 ");
Serial.print(temp); Serial.print(" V2 ");
Serial.print(temp); Serial.print(" V3 ");
My question is why the sheild is returning a lower value for 4.9V than that of 3.2V. Also it need to return a value of 32768 for 0V (I guess). Is there any error in code.