nodemcu-firmware/lua_modules/ds18b20
Nick Andrew 0a7b730e23 Support DS18S20 and fix negative temp handling
The DS18S20 has only 1 fractional bit whereas DS18B20 has 4, and their
temperature register alignment differs. Check the family code to choose
the correct multiplier for both devices.

Closes #610

Negative temperatures (less than 0°C) are returned as a sign-extended
two's complement number. Subtract 0x10000 to recover the proper
negative value.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
2015-11-16 23:32:20 +11:00
..
ds18b20-example.lua DS18B20 module examples 2015-01-10 10:58:08 +01:00
ds18b20-web.lua DS18B20 module examples 2015-01-10 10:58:08 +01:00
ds18b20.EN.md Fix the bug of memory release in documents. 2014-12-23 16:24:53 +08:00
ds18b20.ZH.md Move ds18b20.CN.md to ds18b20.ZH.md 2015-01-21 18:45:08 +08:00
ds18b20.lua Support DS18S20 and fix negative temp handling 2015-11-16 23:32:20 +11:00