Arduino 如何将移位寄存器与LCD(16,2)一起使用
我在使用带有LCD的移位寄存器进行一个项目时遇到了一个问题,该项目需要Arduino Nano上有很多GPIO引脚 下面是示例代码:Arduino 如何将移位寄存器与LCD(16,2)一起使用,arduino,Arduino,我在使用带有LCD的移位寄存器进行一个项目时遇到了一个问题,该项目需要Arduino Nano上有很多GPIO引脚 下面是示例代码: // 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) LiquidC
// 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);
}
我已经重新安装了Arduino IDE、库并删除了所有过去的个人草图,但似乎没有任何效果。我对Arduino很陌生,所以我唯一的假设是库出了问题。发生这种情况的原因是因为您包含了
移位LCD
库的开发版本。与其从Github存储库安装开发版本,不如下载
啊,好的,非常感谢!
no matching function for call to 'LiquidCrystal::LiquidCrystal(int)'