From bce686a8ed0287ea9c8f4f5b532e12f215f9bd50 Mon Sep 17 00:00:00 2001 From: HuangRui Date: Sun, 7 Dec 2014 12:51:44 +0800 Subject: [PATCH] * Changed the temperature output format, add MIT licence. --- examples/ds18b20.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/ds18b20.lua b/examples/ds18b20.lua index ed29efa4..c7486a6e 100644 --- a/examples/ds18b20.lua +++ b/examples/ds18b20.lua @@ -1,4 +1,10 @@ --- 18b20 Example +--[[ +-- 18b20 one wire example for NODEMCU +-- NODEMCU TEAM +-- LICENCE: http://opensource.org/licenses/MIT +-- Vowstar +--]] + pin = 9 ow.setup(pin) count = 0 @@ -37,7 +43,7 @@ else t = (data:byte(1) + data:byte(2) * 256) * 625 t1 = t / 10000 t2 = t % 10000 - print("Temperature="..t1.."."..t2.."Centigrade") + print("Temperature= "..t1.."."..t2.." Centigrade") end tmr.wdclr() until false