Chat about current Lua tools and IDEs

User avatar
By Markus Gritsch
#5837
alonewolfx2 wrote:its working fine but what is the error message?
Code: Select all~~END~~
stdin:1: unexpected symbol near '~'


Just ignore it.

It seems the Lua interpreter receives some bytes of the serial input buffer when redirecting input back to him. If you take a closer look at the output of LuaLoader when uploading a file, it shows something similar:
Code: Select all> > > > > > > > > > > > > > > > > > >
>
= node.heap()

stdin:2: unexpected symbol near '='

If this message really bothers you, change
Code: Select allser.write('~~END~~\r')
print read_till_prompt()

to
Code: Select allser.write('~~END~~\r')
read_till_prompt()


alonewolfx2 wrote:file cant close if i change with this
Code: Select all~~END~

If you take a look at the embedded Lua code at the beginning of uploader, you will see that ~~END~~ is used to terminate file writing, and return to normal interactive mode. So it has to be sent verbatim of course.
User avatar
By alonewolfx2
#6093
Markus Gritsch wrote:NodeMcu version 0.9.4 build 2014-12-30 changed the uart.on API. This prevents uploader.py from working correctly.

The attached version works again as expected.

Thank you. Again :)
User avatar
By yes8s
#6432 Thanks Markus! :D Great little tool! I wish I had this earlier as it would of saved me a bunch of time and headaches.

I have a couple of questions:
    1. I noticed that with this tool the lines are written in 'as is', so any leading tabs or whitespaces are written to the esp. There could be a slight gain to be made in execution speed and/or filesize if you strip these out before writing (maybe using a strip() command [I don't know Python that well])... Thoughts?
    2. Also, I have tried Sublime text and the editor looks quite nice. I could not figure out how to use the myNodeMcu.sublime-build part so that I can load the files from the editor itself. Is there something special I need to do? Do I need to store this file somewhere? Pressing F7 from the xxx.lua tab does nothing. Could you please give a little instruction for those who are new to this editor on how to use this feature :)

Thanks