Arduino Liquid Crystal 显示不打印
Arduino Liquid Crystal Display not printing
我正在尝试将 Arduino Uno 的液体 crystal 显示屏用于学校项目。我完全按照 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);
}
`
从您链接的图片来看,显示器似乎没有正确连接:您应该先将排针焊接到它上面。
见红色箭头附近部分:https://i.imgur.com/eSOMe1x.jpg
我正在尝试将 Arduino Uno 的液体 crystal 显示屏用于学校项目。我完全按照 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);
}
从您链接的图片来看,显示器似乎没有正确连接:您应该先将排针焊接到它上面。
见红色箭头附近部分:https://i.imgur.com/eSOMe1x.jpg