Would it (Please, Please) be possible to allow the "temp" command work with either of the two inputs on the esp-01??
I have several of these esp-01 modules and really wanted to use them to read temperature.
If possible PLEASE make these BASIC commands work with the ESP-01 modules as they are very popular and are the smallest for distributed IOT type functionality, and the cheapest $$.
I have been able to read temperature using LUA and nodemcu
pin=4
function getTemp()
tmr.wdclr()
ow.reset(pin)
ow.skip(pin)
ow.write(pin,0x44,1)
tmr.delay(800000)
ow.reset(pin)
ow.skip(pin)
ow.write(pin,0xBE,1)
data = nil
data = string.char(ow.read(pin))
data = data .. string.char(ow.read(pin))
t = (data:byte(1) + data:byte(2) * 256)
if (t > 32768) then
t = (bxor(t, 0xffff)) + 1
t = (-1) * t
end
t = t * 625
ctemp = t
ftemp = (t * 9)/ 5 + 320000
print("F: " .. ftemp)
end
Thanks!
dwight