Thermometer Precision

Hi

I read about the 5V pin…

Now, I’m able to read the thermometer value :slight_smile:

But, is it possible to have more precise value ? (like 21.4 degrees…) (meaning not just int values)

You should be able to by updating the drivers and using float or double in your math

Look at the driver you are using. There is a scale factor. Add a zero to the high and low and the results you get will be in tenths of a degree.

I ain’t using any driver because it is the thermometer provide by GHI in the Ultimate Kit

So, I just use this :

thermometer = new AnalogIn((AnalogIn.Pin)FEZ_Pin.AnalogIn.An3);
thermometer.SetLinearScale(-22, 56);

and read:

thermometer.Read();

So, we should I change things to do what you are suggested ?

Should I put : SetLinearScale(-220,560) and then divide by ten the result to get a One Tenth of precision ?

If you do this…


thermometer.SetLinearScale(-2200, 5600);

then all you have to do is inject your decimal into the output.

what to do mean by inject decimal in the output ?

Because, I don’t use output… just input…

Did not catch the meaning of your answer…

sorry

divide the temperature you get back by 100 for two decimal places or adjust the scale and divisor accordingly for other precisions.

ok… now I get it…

Thanks a lot bro…