使用 ESPlorer 的 NodeMCU 和 HX711

NodeMCU and HX711 using ESPlorer

我不知道他的话题是否适合问这个问题,但问题是:

我有一个 NodeMCU devkit 0.9,我可以使用 ESPlorer 上传基本代码,例如带有一些按钮的 Web 服务器,这些按钮可以打开和关闭板上的 LED。

我试图将 NodeMCU 与称重传感器放大器 (HX711) 连接,我看到它有 libraries for NodeMCU。我如何在我的 .lua 文件中 "include" hx711.c 来识别 hx711.c 中的函数?

当我尝试发送到 ESP 时出现的错误是

LUA interpreter error detected stdin:1: attempt to index global 'hx711' (a nil value)..."

此致。

您需要build a NodeMCU firmware that includes the HX711 module. Then you need to flash将新固件添加到您的 devkit。