I am experiencing a problem in using a shift register with an LCD for a project that requires a lot of GPIO pins on the Arduino Nano.
Here is the example code:
// 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);
}
And here is the error message:
no matching function for call to 'LiquidCrystal::LiquidCrystal(int)'
I have reinstalled the Arduino IDE, libraries and deleted all past personal sketches but nothing seems to work. I am quite new to Arduino so I my only assumption is that something is going wrong with the library.
question from:
https://stackoverflow.com/questions/65643922/how-can-i-use-a-shift-register-with-an-lcd16-2 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…