What library to install for LCM1602C LCD display

My favorite library for the 1602 and 2004 hd55780 controlled character LCDs is the hd44780 library by Bill Perry.

If your LCD is the bare 1602 LCD (not I2C) use the hd44880_pinIO class.

The hd44780 library is available to install using the IDE library manager. How to install an Arduino library.

Here is my simple test code for the 4 pin parallel non I2C LCD:

#include <hd44780.h>
#include <hd44780ioClass/hd44780_pinIO.h> // Arduino pin i/o class header

const int rs = 8, en = 9, db4 = 4, db5 = 5, db6 = 6, db7 = 7; // for all other devices

hd44780_pinIO lcd(rs, en, db4, db5, db6, db7);

// LCD geometry
const int LCD_COLS = 16;
const int LCD_ROWS = 2;

void setup()
{
   lcd.begin(LCD_COLS, LCD_ROWS);
   lcd.print("Hello, World!");
   lcd.setCursor(0, 1);
   lcd.print("millis = ");
}

void loop()
{
   static unsigned long timer = 0;
   unsigned long interval = 1000;
   if (millis() - timer >= interval)
   {
      timer = millis();

      lcd.setCursor(10, 1);
      lcd.print(millis());
   }
}