Why does the Arduino IDE work with NodeMCU? [close

2019-09-19 19:31发布

问题:

I know when we buy a NodeMCU, we get the NodeMCU firmware already installed in it. But how come we are able to use the Arduino IDE (used for C++ programming) with this dev kit?

How can we use a C++ IDE to work with a Lua-based firmware? What's wrong with my concepts here?

回答1:

"Lua based firmware" is a bit misleading as the core firmware itself is written in C (so is the Lua interpreter btw).

Checkout it's source code https://github.com/nodemcu

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.

It's just two different pieces of software supporting the same micro controller.