Nodemcu 8266没有在LCD上显示文本
我首次将Nodemcu ESP8266与LCD一起使用,无法使其正常工作。它点亮了背景,但没有显示任何文字。
LCD地址:0x27 SDA:D4 SDL:D3 vnn:vin GND:GND
代码:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//Set LCD Address 0x27 for LCD1602 (16 chars 2 line display)
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
lcd.begin(0,2); // SDA-0 (GPIO D3 = 0), SCL-2 (GPIO D4 = 2)
lcd.backlight();
lcd.print("Hello world");
}
void loop() {
}
I am using nodemcu esp8266 with LCD for the first time and I'm unable to make it work. It lights the background but it does not show any text.
LCD Address: 0x27
sda: d4
sdl: d3
vnn: vin
gnd: gnd
Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//Set LCD Address 0x27 for LCD1602 (16 chars 2 line display)
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
lcd.begin(0,2); // SDA-0 (GPIO D3 = 0), SCL-2 (GPIO D4 = 2)
lcd.backlight();
lcd.print("Hello world");
}
void loop() {
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将图书馆从原始图书馆更改为 https://githbithub.com/fdebrabander.com/fdebrabander/arduino-inoino----arduino-in-arduino---- LiquidCrystal-I2C-Library LCD可以显示文本。
I changed the library from the original to https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library LCD can display text.