首页 > 解决方案 > Arduino液晶显示器不打印

问题描述

我正在尝试将 Arduino Uno 的液晶显示器用于学校项目。我完全按照https://www.arduino.cc/en/Tutorial/HelloWorld上的说明进行操作,并且没有打印文本。背光功能正常,并且正在使用电位器调整对比度,但没有文字出现。

#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    // Print a message to the LCD.
    lcd.print("hello, world!");
}

void loop() {
    // set the cursor to column 0, line 1
    // (note: line 1 is the second row, since counting begins with 0):
    lcd.setCursor(0, 1);
    // print the number of seconds since reset:
    lcd.print(millis() / 1000);
}  

在此处输入图像描述`

标签: arduinolcd

解决方案


从您链接的图像来看,显示器似乎没有正确连接:您应该先将一个排针焊接到它上面。

查看红色箭头附近的部分:https ://i.imgur.com/eSOMe1x.jpg


推荐阅读