Post your best Lua script examples here

User avatar
By rtenklooster
#18042 I dont know how you guys managed to get this bmp sensor to work. I have tried all the bmp scripts I could find, but always get a low memory error.

Someone else is getting those problems? Help would be appreciated.
User avatar
By Mikejstb
#18079 I've had several Lua projects which have the memory problem.
I don't remember if I had the problem with my bmp180/mqtt project but it could have.
I always try using the "latest" nodemcu firmware first, then if that doesn't have enough memory I try the float version, then the integer version if all else fails.

Which is why I'm been working to port my work to the ESP-Arduino environment . So far I haven't had any memory problems there.
User avatar
By jtheires@netins.net
#21043 aniston,

Thanks for the bmp180 lua script.
My circuit is rather simple: ESP8266-01 (known good) wired to FTDI as usual. No bmp sensor in the circuit yet.
I've downloaded your 2 files from https://github.com/javieryanez/nodemcu- ... ter/bmp180 and renamed the shorter unnamed example file (which defines pins and prints temps and pressures) init.lua. Saved init.lua to 8266 using ESPlorer without issue.
I'm getting an error message when I attempt to Save to ESP the bmp180.lua file:
"FILE="bmp180.lua" file.remove(FILE) file.open(FILE,"w+") uart.setup(0,9600,8,0,1,0)
> >> > > > > > > > > > > > > > > > > > >
--Done--
>
>
> dofile("bmp180.lua")
not enough memory
> file.close();"
and then a message from ESPlorer: "Waiting answer from ESP - Timeout reached. Send aborted."

It seems others are having this issue as well.
Any thoughts?