Playing with a NodeMCU /8266 Debugging
For a deeper dive into the tools, I wanted to play with the NodeMCU /LUA environment (3) , while debugging a NodeMCU that I could not seem to get to take the arduino 8266 code.
The Arduino programming of 8266 was an extension of something I already was familiar with, but this one chip would not take a program through that method.
I decided to look into the native code that comes from the factor, which is Based on NodeMCU. I searched and found a tool called ESPlorer, but it was made in Russia. At first I was a bit apprehensive, but then I found I could get the source code, meaning I could look at the code, and then setup from that which made me happy.
With this tool and a bit of learning from a couple of my favorite sites(1, 4), I was able to launch and run the code, and to get a response from the “wayward” chip.
I found a init.lua file that after inserting my SSD and passphrase, I was able to get it uploaded and executed:
tmr.alarm(1, 1000, 1, function()
if wifi.sta.getip() == nil then
print(“IP unavaiable, Waiting…”)
print(“ESP8266 mode is: ” .. wifi.getmode())
print(“The module MAC address is: ” .. wifi.ap.getmac())
print(“Config done, IP is “..wifi.sta.getip())
Next I got a small webserver code to run:
conn:send(“<h1> ESP8266<BR>Server is working!</h1>”)
ESPlorer interface as I execute the two code snippets::
Web Page output:
I hope to update this NodeMCU so that I can program it just as I did the earlier units, but this was a fun learning experience!
The ESPlorer user interface (in java)