-->
Page 1 of 2

Lua firmware question

PostPosted: Mon Dec 30, 2019 7:44 am
by faramon
Hi folks,

I have a question about preparing and downloading firmware from https://nodemcu-build.com/
I have download this custom build module. This is great for LUA scripting and programming and I always do it with LUA. Simple and stable, works great as mqtt esp client doing stuff.
Does this same firmware supports uploading arduino code or this is some another story? My friend have arduino coded into esp8266-01 and he told me that firmware is the same. Is he right?
Thanx,
Faramon

Re: Lua firmware question

PostPosted: Mon Dec 30, 2019 3:37 pm
by marcelstoer
You either program in the Arduino IDE using Arduino code OR your program against the NodeMCU firmware using Lua code but not both. It's either or. The NodeMCU firmware is erased and replaced by your Arduino sketch. You code it like any other Arduino. You have to flash the NodeMCU firmware if you want to run Lua scripts on it again.

For NodeMCU you'd use something like ESPlorer to upload the Lua code. This allows for really fast prototyping as you only need to flash the firmware once. With Arduino you compile your own code with the Espressif SDK into a new binary every time you change your code.

It's just two different pieces of software supporting the same micro controller. Both build upon the same SDK by Espressif.

Re: Lua firmware question

PostPosted: Mon Dec 30, 2019 5:15 pm
by faramon
Hi marcelstoer, ok, i do coding in lua with esplorer. But what if I do need to rewrite with the arduino firmware? Do I need to flash some arduino firmware? If so, is the firmware same, can I rewrite it with lua firmware and compile arduino code and upload it with arduino ide? Or firmware is not same :( ?

Re: Lua firmware question

PostPosted: Mon Dec 30, 2019 5:20 pm
by marcelstoer
With the NodeMCU firmware you flash the firmware (includes SDK) and copy the Lua files.

With Arduino you build SDK, Arduino layer and your own code into a single binary that is flashed. The Arduino IDE takes care of everything. No need to separately flash an Arduino "firmware" or so.