-->
Page 1 of 1

AT command vs lua

PostPosted: Wed Apr 08, 2015 4:07 pm
by Bruster999
Can anyone explain (or point to an explanation of) the difference between AT commands and Lua? What can I do with Lua that I can't do with AT commands? What CAN be done with AT commands. I know Lua is powerful and have played around with it but my two ESPs simply won't run the Lua commands (under investigation) so I'm looking for ways to create my IoT projects with AT commands.

Re: AT command vs lua

PostPosted: Wed Apr 08, 2015 4:23 pm
by OssO
Hi,

in fact, you have three general ways to use this module.

1) compile native software, including everything and load it in. What it will do is defined in time of compilation. Many examples are available around of this.
2) use firmware with any interface for other uController, like AT commands. Then, your module will be almost "stupid" without any other uC controlling it, so you wil have to program something else and connect them together - like arduino
3) use any higher interface, with ability to store commands to be done after restart, like Lua. Then, you can once upload Lua firmware, then play around quickly with serial port on PC like with AT commands, but you can also store your program for later execution.

AT commands are very simply, and the ESP acts only as slave to other inteligence.
Lua interpretter is much much more powerfull and can make the ESP work alone - but also it can be used in cooperation with other uC.
Native firmware gives you available all the functionality of ESP, but it requires more programming practise and many many uploadings of firmware. Then, it can do anything ( e.g. AT commands or Lua interpretter :) )
Also promising looks project with direct upload of arduino sketches ( like native firmware )

Re: AT command vs lua

PostPosted: Wed Apr 08, 2015 4:27 pm
by OssO
To Bruster999 - why do you think your modules will not play Lua ? There is no "electrical" reason to have some modules not behave like others, they are all the same inside. Maybe only size of flash can differ, most modules use 512kB (=4Mb) as I know, and nodemcu version 0.9.5. will fit to it.