Post your best Lua script examples here

User avatar
By scargill
#4321 Finally come up with a way to handle the lack of multiple timers - this code should start up - connect, get temperature regularly and be available to talk to a TCP APP (it's a listener). Reality is - on power up it may well die requiring reloading the firmware. Clearly the Lua interpreter needs far more in the way of Ram control and protection but is that's what's wrong or did I get something fundamentally wrong.. Read the blog here and if anyone wants to help get this working - it could be a really useful base. http://scargill.wordpress.com/2014/12/09/lua-memory-woes/
User avatar
By scargill
#4351 You are a WONDERFUL person... but could you please take a look at my blog entry ... I am having an AWFUL problem with rebooting and unreliability. I worked on this code to make a general purpose mechanism to use the one timer to do timed events - and it all seems to work well until you package it up with the init.lua - and it is now quite able to brick the board requiring a firmware upload... might be RAM - no IDEA how much FLASH is available..

http://scargill.wordpress.com/2014/12/0 ... mory-woes/

I can better describe the program logic if needed. I really thought I was onto a winner with this one but it just crashes. Do we have a command to ask how much FLASH is left? Is there any way to make this reliable - as it's the beginning of a decent application?

When will the next release with more timers be available?

Keep this up - it's looking good...

Pete.