目前使用的是使用 ESP8266 芯片的 NodeMCU 将数据从传感器发送到服务器,但我也想通过连接到节点 MCU 的 LCD 查看信息,我在教程代码中唯一找到的就是这个页面
不幸的是我不知道那种语言,所以我检查了库的链接和那里提供的代码,但它告诉我在 arduino IDE 中存在无效连接,我认为这是由具有相同名称的启用程序引起的图书馆。有人可以帮我确认一下吗?如果你这样做,你能告诉我如何解决它吗?
代码:
全选#include
#include
// Set the LCD address to 0x27 for a 16 chars and 2 line display
// Arduino UNO => PIN 4 = SCL, PIN 5 = SDA
// NodeMCU Dev Kit => D1 = SCL, D2 = SDA
#define SCL D3
#define SDA D4
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
// ini
tialize the LCD
lcd.begin();
// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello LCD Line 1");
lcd.setCursor(0, 1);
lcd.print("Hello LCD Line 2");
lcd.setCursor(0, 2);
lcd.print("Hello LCD Line 3");
lcd.setCursor(0, 3);
lcd.print("Hello LCD Line 4");
}
void loop()
{
// Do nothing here...
}