Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.
Compile error · library mismatch

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

The code was written for a different LCD library. With Frank de Brabander’s LiquidCrystal I2C, call lcd.init() (or lcd.begin(16, 2)) instead of lcd.begin().

All boardsUpdated 3 Nov 2026

Community draft — report a mistake

What you see

OutputOutput
LcdHello.ino: In function 'void setup()':
LcdHello.ino:5:13: error: no matching function for call to 'LiquidCrystal_I2C::begin()'
   lcd.begin();
             ^
In file included from LcdHello.ino:2:0:
libraries\LiquidCrystal_I2C/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 );
        ^~~~~
libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:58:8: note:   candidate expects 3 arguments, 0 provided
exit status 1

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

The compiler’s candidate list says the installed library has begin(cols, rows, charsize) — and no begin() without arguments. Your code came from a tutorial that used another LiquidCrystal_I2C library.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  lcd.init();          // instead of lcd.begin();
  lcd.backlight();
  lcd.print("Hello");
}

Quick fix — try in order

  1. 1

    Use lcd.init()

    Replace lcd.begin(); with lcd.init();, then lcd.backlight();. The size is already set in the constructor LiquidCrystal_I2C lcd(0x27, 16, 2);.

  2. 2

    Or pass the size to begin()

    lcd.begin(16, 2); also matches the candidate the compiler lists.

  3. 3

    Check the constructor style

    Code like LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); is for the NewLiquidCrystal library (F. Malpartida) — a different library with the same header name.

  4. 4

    Keep only one LCD library

    Several libraries ship a LiquidCrystal_I2C.h. Remove the ones you don’t use so the IDE can’t pick the wrong one.

Why it happens

Why do examples differ?

At least three Arduino libraries are called LiquidCrystal_I2C. Some have begin() without arguments; Frank de Brabander’s (the one in the Library Manager) has init() and begin(cols, rows).

Compiles but screen is blank or shows blocks

Then the code is fine and the issue is address or contrast — see LCD shows blocks or blank.

Prints only one letter

Old copy of the library — see LCD prints only the first character.

Board-specific notes

Arduino Uno: Tested sketch and wiring: 16×2 I2C LCD with Uno.

Parts: 16×2 I2C LCD — addresses 0x27 / 0x3F.

↑↓ to move · Enter to open