Hi again,

Took a quick look at your calculations and saw that you got (4.9v-0.2v)/1024=0.0045v, i calculate that to 0.00458984375...... So you have a big rounding error, that's not a good start....... You need to use more precice than that.

Which sensor are you using?

/Ingvar