As the title says... Chat on...

User avatar
By Jeannot
#20718 Guys, I'm new here, thanks in advance for your support!

Running nodemcu_integer_0.9.6-dev_20150406.bin.

It contains 2 files, init.lua and the main temp20.lua (4097 bytes)

On startup, node.heap() returns 20952.
temp20.lua runs perfectly fine when started by itself.
but when init.lua contains 'dofile("temp20.lua")', I get: "not enough memory"
Also tried to compile to temp20.lc, same behavior.

I have reflashed the bin, formatted the file area and re-uploaded, no can do.

To rule out hardware, try this on two different NodeMCUs...

I'm running out of ideeyers... Anything?
User avatar
By TerryE
#20757 The quick answer, but long read is in my link below :)
User avatar
By TerryE
#20866 To do a dofile from inside init.lua, you have to have enough RAM to contain both files if you do this the simple way. The FAQ explains how to use events such as timer alarms to break up your code into modules than can fit in RAM sequentially.