Commit Graph

13 Commits

Author SHA1 Message Date
Lukáš Voborský 55c368ac03 DS18B20 module - update (enhanced, optimized) (#1996) 2017-08-16 21:04:52 +02:00
Arnim Läuger 925991715f Fix float version, auto-detect int/float, OO tmr (#1866) 2017-03-16 23:10:04 +01:00
Arnim Läuger 46f651cccb Fix self.pin when specifying lpin for readTemp() (#1865) 2017-03-16 12:36:09 +01:00
Jonathan Karras 4acabab1cc Change address printing to Hex from Base64. (#1840) 2017-03-07 07:06:50 +01:00
vsky 5feae3fee1 Re-write DS18B20 asynchronous example (#1820) 2017-02-25 22:56:45 +01:00
Sebastian Schildt 0863a4c221 Fix unit constants to be consistent with code
Extend example to show querying different units or specific sensors
2016-01-17 14:39:39 +01:00
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
Tamas Szabo 67ab2d018e Update ds18b20.lua 2015-02-21 17:05:16 +01:00
sza2 5a629e4297 Fix for negative values 2015-02-14 10:48:41 +01:00
Tobias Mädel 4bde88cd81 Fixed DS18B20 handling because of new floating point handling
Hi,

because of the new floating point API, the old ds18b20 code returns strange values like "19.8250.8250". 
This change fixes that. 

Best regards,
Tobias
2015-02-01 18:20:45 +01:00
HuangRui 8cc661923b The read function returns an incorrect temperature. Fixed #149. 2015-01-31 10:46:43 +08:00
HuangRui d4dcf55764 Formatted ds18b20.lua. 2015-01-26 18:16:55 +08:00
funshine 152107feab rename folder name to pre_build 2014-12-22 20:28:37 +08:00