Compilation Error : Arduino Uno with 16x2 I2C LCD

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
unsigned long prevMillis;
int count = 0;
const unsigned long interval = 100;

void setup() {
  lcd.begin (16, 2); // for 16 x 2 LCD module
  prevMillis = millis();  // get the time at the start

void loop() {
  static bool countDoneFlag = false ;
  static bool doOneTime = false;
  unsigned long now = millis();
  static long timecheck;

  if (now - prevMillis >= interval) {
    if (!countDoneFlag) {
    prevMillis += interval;
  if (count >= 10000) {
    if (!doOneTime) {
      timecheck = millis();
      doOneTime = true;
    countDoneFlag = true;
    lcd.setCursor(0, 0);
    lcd.print("Counting ended");
    lcd.setCursor(0, 1);
    lcd.print("time= ");
    lcd.print( timecheck);
  } else {
    char displayText[17] = "";
    snprintf(displayText, sizeof(displayText), "PulseCount:%5d", count);
    lcd.setCursor(0, 0);

The compilation error I get:

Compiling sketch…
“C:\Users\Umesh\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++” -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Users\Umesh\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino” “-IC:\Users\Umesh\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\standard” “-IC:\Users\Umesh\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\Wire\src” “-IC:\Users\Umesh\Documents\Arduino\libraries\NewliquidCrystal” “C:\Users\Umesh\AppData\Local\Temp\arduino_build_705469\sketch\sketch_sep12c.ino.cpp” -o “C:\Users\Umesh\AppData\Local\Temp\arduino_build_705469\sketch\sketch_sep12c.ino.cpp.o”
In file included from C:\Users\Umesh\Documents\Arduino\libraries\NewliquidCrystal/LiquidCrystal_I2C.h:35:0,

from C:\Users\Umesh\Documents\Arduino\sketch_sep12c\sketch_sep12c.ino:3:

C:\Users\Umesh\Documents\Arduino\libraries\NewliquidCrystal/LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )


C:\Users\Umesh\Documents\Arduino\libraries\NewliquidCrystal/LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };


C:\Users\Umesh\Documents\Arduino\libraries\NewliquidCrystal/LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };


C:\Users\Umesh\Documents\Arduino\libraries\NewliquidCrystal/LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

Not able to understand what it means. Thanks in advance…

It's warnings, not errors.

Possibly the library was written for an older version of the compiler and a newer version of the compiler complains. But as said, they are warnings.

As an alternative, you could use my hd44780 library package.
It will automatically locate the i2c address and auto detect the pin mappings and backlight active level so you don't have to hard code that information in the constructor.
It can be installed using the library manager.
You can read more about it here: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library

--- bill

@sterretje is it ok if I continue with the same library or should I try the one perry is suggesting?

Hi perry I tried your lib and it did not give me any compilation warning or errors. Thanks.