Suaad:
I think that's it
SensorReading = analogRead(SensorPin);
Serial.print("Voltage = ");
float Voltage = float(SensorReading) * (5.0 / 1023.0);
Serial.print(Voltage);
Serial.println("V");
delay(3000L);
the outputs values must be in (Volt) now, right?
I don't know why so many people here have a penchant for being sarcastic and offering no help.
What you need to know is how the A/D converter works in order to use it properly.
Normally, it takes in a DC voltage between 0.0 and 5.0 volts. Since it's a 10 bit AD, it's results can vary from zero to 2^10 (2 to the 10'th power) which is 1024-1 (1023).
So, before you make any calculations, if you put in 0 volts, you get a reading of 0. Put in 2.5 (half of 5) and you get 511 or 512 (half of 1024). Put in 5 volts and you get 1023. Put in any more and you still get 1023 - can't go any higher (and of course you burn out the input, but that's not the point).
OK so now you know that 0 volts is AD 0 and 5 volts is AD 1023 and it's a straight line linear function.
Certainly you know where to go from here?
Say you want to make a display of some sort that shows "0" with 0 volts input and "5" with 5 volts input. What do you have to divide 1023 by to get 5? Just do "factor = 5 / 1023" and factor is 0.00488... which in effect means "there's 0.005 volts for every AD count".
See now? Just do this (pseudo-code):
factor = (5 / 1023); // conversion factor
loop {
raw = read_ad; // get raw reading 0...1023
actual = (raw * factor); // convert it to 0...5
display actual; // display actual volts
}
You could do it the other way around too...
[b]factor = (1023 / 5);
actual = (raw / factor);[/b]
......same thing, just algebra from the other direction.
Make sense?