Chat about current Lua tools and IDEs

User avatar
By marcelstoer
#59987
Thomas Jakober wrote:Thanks for response, but no my setting is correct. Could it be the version of LUA? I am using 5.1.4


That's got nothing to do with Lua, you don't even need it on your host system (it's built into NodeMCU). However, the code you showed under the "Scan Network" sample is (Micro)Python code and not Lua.
User avatar
By Thomas Jakober
#59988 Do I need to install something for MicroPython? I am programming in Lua. But when I click on some of the provided buttons which would make life easier I got these messages. I flashed my chips with the builds from NodeMCU custom builds. Might be they don't contain MicroPython. This is the output after reset:
Code: Select allNodeMCU custom build by frightanic.com
   branch: dev
   commit: c5c0143b2fa6402915beca2a50da7241247e1409
   SSL: false
   modules: am2320,bit,cjson,encoder,file,gpio,http,i2c,mdns,net,node,ow,rotary,spi,struct,tmr,uart,websocket,wifi
 build    built on: 2016-12-15 10:57
 powered by Lua 5.1.4 on SDK 2.0.0(656edbf)
User avatar
By marcelstoer
#59989 Stop right there before you get all confused.

You flashed the NodeMCU firmware to ESP8266. So you'll be programming in Lua. That's the base line. If you wanted to program in Python you'd have to load the MicroPython firmware onto ESP8266. But you didn't do that. Side note: you don't need either Lua or Python installed on the system you run ESPlorer on.

For some reason(s) I don't understand, your ESPlorer is emitting (Micro)Python code rather than Lua code when you push those buttons. No wonder the NodeMCU firmeware doesn't understand that and reports errors. ESPlorer shouldn't do that and I've never seen it do that on my systems in the last 20 or so months I've been using it. That's why I suggested you look into the settings to make sure ESPlorer is configured for NodeMCU rather than MicroPython.
The fact that you're able to see the firmware startup message from my cloud build service is a good sign because it means a) that the firmware was successfully flashed and b) that the baud rate settings in ESPlorer are correct.

At this point all I can suggest is that you make yourself familiar enough with ESPlorer to track this down. Have a look at https://esp8266.ru/esplorer/#tutorials.
User avatar
By Thomas Jakober
#60009 Thanks to your information I went again to the settings and tried to switch once to MicroPython mode. Then I saw that the command buttons changed. So I switched back to NodeMCU and from then on, the commands started to work correctly :D
Only the WiFi Tab still is sending MicroPython commands, "Scan AP" or "Connect to AP" for example.

Thanks again for your help!