Post your best Lua script examples here

User avatar
By ThomasW
#6085
pipi61 wrote:Hi!
self.sk:on("receive",function(sck,payload)
-- tmr.stop(self.udptimer)
sck:close() << in this line sk or sck close????
--------
Happy New Year
Puzsar


sck - as passed into the function

Thomas
User avatar
By zhivko
#12471 I am trying to run this along webserver and temperature reader ds18b20 on esp8266 - but I quickly run out of memory... Is it possible to reduce memory consumption somehow?
I have
node.heap()=9376
then I run:
loadfile("ntp.lua")():sync(function(T) print(T:show_time()) end)
node.heap()=5504

So cca 4k heap consumed in ntp.lua?

Can this heap be released somehow for single ntp call usage?