-->
Page 2 of 4

Re: dofile gives not enough memory

PostPosted: Fri Apr 03, 2015 12:42 pm
by raz123
You might want to read about "require" vs "dofile".

Hint: replace "require('ds18b20')" by dofile('ds18b20.lua')(parameter_here) -- ds18b20.lua will have to be modified so as to have a returning function.

Re: dofile gives not enough memory

PostPosted: Fri Apr 03, 2015 12:46 pm
by snice
hi raz123,

I'm beginner in Lua coding (expert of .NET/C++ apps)... I replaced the require('ds18b20') by dofile('ds18b20.lua'), still same problem:

dofile("tempLogger.lua")
not enough memory

Re: dofile gives not enough memory

PostPosted: Sat Apr 04, 2015 12:06 am
by raz123
snice wrote:hi raz123,

I'm beginner in Lua coding (expert of .NET/C++ apps)... I replaced the require('ds18b20') by dofile('ds18b20.lua'), still same problem:

dofile("tempLogger.lua")
not enough memory


If you aren't able to squeeze any more memory from your program, then you could compile a lightweight version of Nodemcu without all the extra modules/features that you won't be using.

For my part, I tend to compile without floating point, pwm, i2c, spi, adc, ow, bit, mqtt, coap, u8g, ws2812 and cjson.

Re: dofile gives not enough memory

PostPosted: Sat Apr 04, 2015 4:24 am
by snice
then this firmware is a complete bullshit if we can't have 52 lines of custom program :shock: