在Arduino Nano上需要大量GPIO引脚的项目中,我在使用带LCD的移位寄存器时遇到了问题。
示例代码如下:
// 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);
}
下面是错误消息:
no matching function for call to 'LiquidCrystal::LiquidCrystal(int)'
我已经重新安装了Arduino IDE,库,并删除了所有过去的个人草图,但似乎都不起作用。我对Arduino还很陌生,所以我唯一的假设是这个库出了问题。
发布于 2021-01-09 23:09:14
https://stackoverflow.com/questions/65643922
复制相似问题