jensnielsen / ds18b20

Quite portable driver for the ds18b20 temperature sensor
3 stars 2 forks source link

The temperature values are meaningless. How to accumulate that info? #2

Closed mozcelikors closed 3 years ago

mozcelikors commented 10 years ago

When the code is executed, the temperature values are around 450 to 600. How do I change it in order to obtain Celcius degrees?

jensnielsen commented 10 years ago

I don't really remember this but you should find the resolution of the ds18b20 in the data sheet. I'm pretty sure it's in celsius already though.

Are you running this in room temperature? You have a very large variation, so unless you are changing the temperature my guess is that you're not reading it properly from the ds18b20...

On 2014-01-22 19:19, mozcelikors wrote:

When the code is executed, the temperature values are around 450 to

  1. How do I change it in order to obtain Celcius degrees?

— Reply to this email directly or view it on GitHub https://github.com/jensnielsen/ds18b20/issues/2.

mozcelikors commented 10 years ago

Hello, thanks for the fast reply.

I have to say after shifting through a precision of 9 bits , I got the right results. I would like to contribute to that part when I have time.

jensnielsen commented 3 years ago

There's now a float member representing the actual temperature