Post your best Lua script examples here

User avatar
By picstart
#10375 Well,
There are two actions.
a) uploading a file *.lua into the lua file system and
b) running code via the lua interpreter

The lua interpreter is involved in both but in a) it is only asked to execute the writing of code into a file so special escape [[...xxxxx...]] syntax is used so the interpreter doesn't interpret what is between [[ and ]] while uploading to the file.
With other and earlier lua loaders the writeline[[xxxx]] was needed.
Since this was somewhat unpleasant the 0.83 loader was improved and will now upload code for the interpreter via the "upload file" button without the need of the [[xxx]]
syntax ( it does it for you behind the scenes ). A binary upload is faster so 0.83 will load a lua file to upload your lua code as binary. To do this is must first up load via text loader the binary loader.
This is automatic so the first file has two automated steps and subsequent files one automated step.This is faster for code files and necessary for non text files such as a*.gif.
User avatar
By Brian
#10563 Thank you for your help everyone.
Made a lot of progress today.
I now have a script that loads some text from a web page and operates an LED when done.
Eventually it will be out putting that text to a scrolling LED text display. (LED BELT BUCKLE)
So the ESP will basically be programming the buckle with a received SMS message