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

Nishant's picture

Offline

Joined: Sep 12, 2018

Replies: 0
error: no matching function for call to 'LiquidCrystal_I2C::begin()'
August 2, 2019 - 5:23pm

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. 
Ferry's picture

Offline

Joined: Sep 20, 2018

Replies: 8
error: no matching function for call to 'LiquidCrystal_I2C::begi
August 2, 2019 - 5:39pm

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. 

 

Hichem's picture

Offline

Joined: Apr 05, 2020

Replies: 1
error: no matching function for call to 'LiquidCrystal_I2C::begi
April 5, 2020 - 3:51am

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

 

 

 

 
Debasis Parida's picture

Offline

Joined: Aug 22, 2019

Replies: 113
use the function correctly
April 7, 2020 - 4:34pm

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

Muhammad Umar's picture

Offline

Joined: Apr 09, 2020

Replies: 55
Specific Function for I2C LCD
May 9, 2020 - 2:26pm

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.

Technical Shahzad's picture

Offline

Joined: May 23, 2020

Replies: 48
I2C LCD Usage with Specific Function
May 26, 2020 - 2:28pm

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.