arduino - 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);
}
`
解决方案
从您链接的图像来看,显示器似乎没有正确连接:您应该先将一个排针焊接到它上面。
查看红色箭头附近的部分:https ://i.imgur.com/eSOMe1x.jpg
推荐阅读
- r - 拆分 R 数据框中的每个字符串
- javascript - 复选框全选/取消全选使用jQuery的锚链接
- python - ValueError:SavedModel 的 SignatureDefs 中没有“serving_default”。可能的值为 ''
- c - 在函数 2D DMA 中传递地址
- java - @Transactional 回滚在 SpringBoot 中不起作用
- laravel - 渲染期间应用程序区域设置加密的未知原因?
- python - 列未使用此 groupby 转换填充缺失值
- sql - 将查询结果导出到excel
- azure - Azure B2C 的自定义用户管理
- javascript - 如何在ejs中替换unicode