I'm sorry I don't know how to "change the constructor". What's that?
It's the initialization code which tells the Arduino which of its pins are connected to the pins of the display.
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = any pin, en = any pin, d4 = any pin , d5 = any pin, d6 = any pin, d7 = any pin;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
The circuit:
- LCD RS pin to any pin
- LCD Enable pin to any pin
- LCD D4 pin to any pin
- LCD D5 pin to any pin
- LCD D6 pin to any pin
- LCD D7 pin to any pin
- LCD R/W pin to ground
- LCD VSS pin to ground
- LCD VCC pin to 5V
- 10K resistor:
- ends to +5V and ground
- wiper to LCD VO pin (pin 3)
Do not use Arduino pins 0 and 1 because they are best reserved for the Serial output and code download. The analog pins can also be used for digital I/O if you are short of pins.