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

  • I2C LCD 16x2

You may see

error: no matching function for call to 'LiquidCrystal_I2C::begin()'
error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int)'
candidate expects 3 arguments, 0 provided
candidate expects 3 arguments, 1 provided

Why it happens

  • Your code was written for one LiquidCrystal_I2C library and a different one is installed.

How to fix it

  1. Our lessons use LiquidCrystal I2C by Frank de Brabander. Install that one.
  2. Create it with three numbers: LiquidCrystal_I2C lcd(0x27, 16, 2);.
  3. Start it with lcd.init(); then lcd.backlight();.
  4. If it still fails, remove the other LiquidCrystal_I2C folder from Documents/Arduino/libraries.

It worked if: Verify passes and the backlight comes on after uploading.

Seen in a real run (some lines are close variants of it). Produced with Arduino CLI 1.5.1 and Arduino AVR core 1.8.8 (the same compiler the Arduino IDE uses). With LiquidCrystal I2C 1.1.2.

Didn't help? Search another error or ask us.