为什么 Arduino IDE 与 NodeMCU 一起工作? [英] Why does the Arduino IDE work with NodeMCU?

查看:43
本文介绍了为什么 Arduino IDE 与 NodeMCU 一起工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道当我们购买 NodeMCU 时,我们会在其中安装 NodeMCU 固件.但是我们为什么能够在这个开发工具包中使用 Arduino IDE(用于 C++ 编程)?

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?

我们如何使用 C++ IDE 来处理基于 Lua 的固件?我的概念有什么问题?

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

推荐答案

基于 Lua 的固件"有点误导,因为核心固件本身是用 C 编写的(顺便说一下,Lua 解释器也是如此).

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

检查它的源代码 https://github.com/nodemcu/nodemcu-firmware

nodeMCU 固件被擦除并替换为您的 Arduino 草图.您可以像任何其他 Arduino 一样对其进行编码.

The nodeMCU firmware is erased and replaced by your Arduino sketch. You code it like any other Arduino.

如果你想再次在 NodeMCU 上运行 Lua 脚本,你必须刷新 NodeMCU 固件.

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.

这篇关于为什么 Arduino IDE 与 NodeMCU 一起工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆