error: no matching function for call to 'LiquidCrystal_I2C::begin()'

Submitted by Nishant on

hey all, i am trying to interface 16x2 LCD display with ESP8266 NodeMCU using I2C shield of 16x2 LCD display. I am getting following error:

Arduino: 1.8.8 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\nishant\AppData\Local\Temp\arduino_modified_sketch_827962\sketch_apr02a.ino: In function 'void setup()':

sketch_apr02a:15:13: error: no matching function for call to 'LiquidCrystal_I2C::begin()'

   lcd.begin();                    // start lcd 

             ^

In file included from C:\Users\nishant\AppData\Local\Temp\arduino_modified_sketch_827962\sketch_apr02a.ino:5:0:

C:\Users\nishant\Documents\Arduino\libraries\LiquidCrystal_I2C-master/LiquidCrystal_I2C.h:58:8: note: candidate: void LiquidCrystal_I2C::begin(uint8_t, uint8_t, uint8_t)

   void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS );

        ^

C:\Users\nishant\Documents\Arduino\libraries\LiquidCrystal_I2C-master/LiquidCrystal_I2C.h:58:8: note:   candidate expects 3 arguments, 0 provided

exit status 1
no matching function for call to 'LiquidCrystal_I2C::begin()'


can you please elaborate why i am getting this error. because i am not finding any mistake in program. 

i can surely say that this is problem of library you have currently in your arduino library folder. the "no matching call" error mostly arrive because the function you are trying to access is not defined in the library you have right now installled. 

Also we have faced the problem when using i2c library for 16x2 LCD. actually there are multiple libraries available with the same name as  "LiquidCrystal_I2C.h" or sometime It is older version of library installed, so when people use wrong libraries they get these library.

The simple solution for this problem is tto install correct library and delete existing libraries for i2c 16x2 LCD. i have used one libarry which solved my problem you can try this one. the link is https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library

this library is especially for esp8266 nodemcu. delete all libraries and install the new library from above link. connect the standard i2c wiring with node mcu and lcd. and run following example:

 

#include <LiquidCrystal_I2C.h>

#include <Wire.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {

Serial.begin(115200);

Wire.begin(D2, D1);

lcd.begin();

lcd.home();

lcd.print("Hello I2C LCD");

}

void loop() { // do nothing 
 }

 

it should solve your problem. 

 

  Joined September 20, 2018      8
Thursday at 02:04 PM

Hello Guys,

I have the same problem. I tried to remove all LiquidCrystal Librairies from he folder Librairies, then when I check the list in Arduino, 

It says they are still there??

Am I doing something wrong '?

Please help me

 

 

 

 

  Joined April 05, 2020      1
Sunday at 03:45 AM

lcd.begin() function is written incorrectly.It should be in the format   "lcd.begin(16, 2)". Change this and recompile your code.

  Joined August 22, 2019      125
Thursday at 12:29 PM

Hi Friend

You code saved my time. Thak you and May Hod Bless You

  Joined January 14, 2022      1
Friday at 12:49 PM

We are glad that, this tutorial was helpful for you!

  Joined September 26, 2019      7
Thursday at 01:53 PM

A few years back, I have a project regarding vehicles GPS location tracking system for that I used ESP8266 12E development board and for display, I used I2C LCD display. I used LiquidCrystal_I2C.h library for this purpose. The error you are facing is due to the library you installed, just remove the previous library and install a new one, after that go to your code and add library in start, declare the LCD with LiquidCrystal_I2C lcd(0x3F, 16, 2); and in setup(), you have to add these below lines; lcd.init(); // initializing the LCD lcd.backlight(); // Enable or Turn On the backlight lcd.setCursor(0,0); // Position of Cursor on LCD Screen lcd.print("Arduino is Awesome."); // Start Printing After that compile the sketch and upload it in your arduino board, hope the issue will get resolved. Here I would like to recommend you an advanced product EFB-IoT by SSLA along with technical support; you can try this device also.

  Joined April 09, 2020      55
Thursday at 02:40 PM

A few years back, I had a project regarding vehicles GPS location tracking systems. For that I used ESP8266 12E development board and for display, I used an I2C LCD display. I used LiquidCrystal_I2C.h library for this purpose. The error you are facing is due to the library you installed, just remove the previous library and install a new one, after that go to your code and add library in start, declare the LCD with LiquidCrystal_I2C lcd(0x3F, 16, 2); and in setup(), you have to add these below lines;

  lcd.init(); // initializing the LCD

  lcd.backlight(); // Enable or Turn On the backlight

  lcd.setCursor(0,0); // Position of Cursor on LCD Screen

  lcd.print("Arduino is Awesome."); // Start Printing

 After that compile the sketch and upload it in your arduino board, hope the issue will get resolved. Here I would like to recommend you an advanced product EFB-IoT by Sierra Software Ltd. along with technical support; you can try this device also.

  Joined May 23, 2020      47
Saturday at 02:49 PM