Nodemcu 8266没有在LCD上显示文本

发布于 2025-01-29 05:31:27 字数 502 浏览 7 评论 0原文

我首次将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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

渡你暖光 2025-02-05 05:31:27

I changed the library from the original to https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library LCD can display text.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文