rwaldron / johnny-five

JavaScript Robotics and IoT programming framework, developed at Bocoup.
http://johnny-five.io
Other
13.3k stars 1.76k forks source link

SI7020 Thermometer: Wrong Temperature Calculation - Bug or Feature? #972

Closed mwittig closed 8 years ago

mwittig commented 8 years ago

https://github.com/rwaldron/johnny-five/blob/master/lib/thermometer.js#L438-L440

The code comment refers to a specification document describing the formula to compute the temperature from the raw data. However, the formula used in the code deviates from the specification.

Specification: (175.72 * Temp_Code/ 65536) - 46.85; Code: (175.25 * Temp_Code/ 65536) - 46.85;

My question is, whether this is a bug or feature*. This is why I put a questionmark on the subject line.

rwaldron commented 8 years ago

That's a bug

mwittig commented 8 years ago

Thank you for your swift feedback.

I have filed a PR to fix the issue. I have changed it for HTU21, too. See page 15 at https://www.adafruit.com/datasheets/1899_HTU21D.pdf

rwaldron commented 8 years ago

Thanks again!