Commit Graph

16 Commits

Author SHA1 Message Date
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 725feade27 Update DS18b20 examples (#1851)
- Remove old non-async examples from `lua-examples`.
- Rename `ds18b20.EN.md` to `README.md`
- Change remaining `toBase64` calls to the more standard `toHex` call.
- Fix some spelling and markdown formatting issues in README file.

Addresses issue #1841
2017-03-10 22:10:49 +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
HuangRui f09f6443d1 Move ds18b20.CN.md to ds18b20.ZH.md 2015-01-21 18:45:08 +08:00
baracudaz 6525747859 DS18B20 module examples
Adding couple of example on how to use DS18B20 module
2015-01-10 10:58:08 +01:00
HuangRui c18f198af8 Fix the bug of memory release in documents. 2014-12-23 16:24:53 +08:00
funshine 152107feab rename folder name to pre_build 2014-12-22 20:28:37 +08:00