首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何将移位寄存器与LCD(16,2)一起使用

如何将移位寄存器与LCD(16,2)一起使用
EN

Stack Overflow用户
提问于 2021-01-09 22:43:28
回答 1查看 38关注 0票数 1

在Arduino Nano上需要大量GPIO引脚的项目中,我在使用带LCD的移位寄存器时遇到了问题。

示例代码如下:

代码语言:javascript
运行
复制
// include the library code:
#include <ShiftedLCD.h>
#include <SPI.h>

// initialize the library with the number of the sspin 
// (or the latch pin of the 74HC595)
LiquidCrystal lcd(8);

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);
}

下面是错误消息:

代码语言:javascript
运行
复制
no matching function for call to 'LiquidCrystal::LiquidCrystal(int)'

我已经重新安装了Arduino IDE,库,并删除了所有过去的个人草图,但似乎都不起作用。我对Arduino还很陌生,所以我唯一的假设是这个库出了问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-01-09 23:09:14

出现这种情况的原因是因为您包含了ShiftedLCD库的开发版本。不是从Github存储库安装开发版本,而是下载suggested stable version

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65643922

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档