Temperature library can be initialized

This commit is contained in:
Ollo 2021-03-21 20:52:27 +01:00
parent 91ab8609b9
commit 9cd54da774

View File

@ -104,6 +104,8 @@ function registerMqtt()
mydofile("telnet")
if (startTelnetServer ~= nil) then
startTelnetServer()
else
print("Cannost start Telnet Server!")
end
else
for i=1,10,1 do
@ -153,8 +155,8 @@ function startMqttClient()
if (mqttServer ~= nil and mqttPrefix ~= nil) then
registerMqtt()
print "Started MQTT client"
if (file.open("ds18b20.lc")) then
t=require("ds18b20")
if (file.open("ds18b20_diet.lua")) then
t=require("ds18b20_diet")
t.setup(2) -- GPIO4
readTemp() -- read once, to setup chip
print "Setup temperature"