require('ds18b20') port = 80 -- ESP-01 GPIO Mapping gpio0, gpio2 = 3, 4 ds18b20.setup(gpio0) srv=net.createServer(net.TCP) srv:listen(port, function(conn) conn:send("HTTP/1.1 200 OK\nContent-Type: text/html\nRefresh: 5\n\n" .. "" .. "" .. "ESP8266
" .. "Temperature : " .. ds18b20.read() .. "
" .. "Node ChipID : " .. node.chipid() .. "
" .. "Node MAC : " .. wifi.sta.getmac() .. "
" .. "Node Heap : " .. node.heap() .. "
" .. "Timer Ticks : " .. tmr.now() .. "
" .. "") conn:on("sent",function(conn) conn:close() end) end )