I get Compile error on the line :lcd.begin();

I just get a compile error during compiling code ,please support me to resolve this problem.
i am also attach my code file

#include<Wire.h>
#include<LiquidCrystal_I2C.h>
//Set the LCD address to 027 for a chars and 2 line dispaly
LiquidCrystal_I2C lcd(0
27, 16, 2) ;
const int stepPin=3;
const int dirPin=4;
int buttonPin;
int r;
int buzzer=10;
int m=8;

void setup()

{

buttonPin=11; //whatever pin your buton is plugged into)
r=12;
pinMode(buttonPin,INPUT_PULLUP);
pinMode(r,INPUT);

// Initiliaze the LCD

lcd.begin();

//Turn on the blacklight and print a message.
lcd.backlight();
lcd.clear();
lcd.setCursor(2,0); //column ,row
lcd.print(Press Start);

//sets the two pin as outputs
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
pinMode(m,OUTPUT);

while(digitalRead(r)== LOW)

{

digitalWrite(dirPin,LOW);//enable the motor to move in particular direction

//make 200 pulses for making one full cycle roataion
for(int x=0; x<400;x++)

digitalWrite(stepPin, HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);

if(digitalRead(r)==HIGH)

break;

}
}

void loop()

{
//check button pressed ,if so enter program condition(inside if statement)

if(digitalRead)(buttonPin==HIGH)//functions based off of button pulling input pin LOW

{
tone(buzzer ,800);
delay(1000);
noTone(buzzer);
lcd.clear();
lcd.setCursor(0,0); //Column,row
lcd.print(Start filling);

{
delay(500);
lcd.setCursor(2,1);//column,row
lcd.print(Bottle 1/6);
digitalWrite(m,HIGH);
delay(1650);
digitalWrite(m,LOW );
delay(1000);//one second delay;
tone(buzzer, 1000);
delay(200);
noTone(buzzer);

}
{
digitalWrite(dirPin,HIGH);// Enabaling the motor to move in a particular direction
//Makes 00 pulses for making one full cycle rotation

for(int x=0;x<100; x++){

digitalWrite(stepPin,HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);

}
delay(500);
lcd.setCursor(2,1); //column ,row
lcd.print(Bottle 2/6);
digitalWrite(m,HIGH);
delay(1850);
digitalWrite(m,LOW);
delay(1000);//one second delay
tone(buzzer,1000);
delay(200);
noTone(buzzer);
}
{
digitalWrite(dirPin,HIGH);// Enabaling the motor to move in a particular direction
//Makes 00 pulses for making one full cycle rotation

for(int x=0;x<100; x++){

digitalWrite(stepPin,HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);

}
delay(500);
lcd.setCursor(2,1); //column ,row
lcd.print(Bottle 3/6);
digitalWrite(m,HIGH);
delay(1850);
digitalWrite(m,LOW);
delay(1000);//one second delay
tone(buzzer,1000);
delay(200);
noTone(buzzer);
}

{
digitalWrite(dirPin,HIGH);// Enabaling the motor to move in a particular direction
//Makes 00 pulses for making one full cycle rotation

for(int x=0;x<100; x++){

digitalWrite(stepPin,HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);

}
delay(500);
lcd.setCursor(2,1); //column ,row
lcd.print(Bottle 4/6);
digitalWrite(m,HIGH);
delay(1850);
digitalWrite(m,LOW);
delay(1000);//one second delay
tone(buzzer,1000);
delay(200);
noTone(buzzer);
}

{
digitalWrite(dirPin,HIGH);// Enabaling the motor to move in a particular direction
//Makes 00 pulses for making one full cycle rotation

for(int x=0;x<100; x++){

digitalWrite(stepPin,HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);

}
delay(500);
lcd.setCursor(2,1); //column ,row
lcd.print(Bottle 5/6);
digitalWrite(m,HIGH);
delay(1850);
digitalWrite(m,LOW);
delay(1000);//one second delay
tone(buzzer,1000);
delay(200);
noTone(buzzer);
}

{
digitalWrite(dirPin,HIGH);// Enabaling the motor to move in a particular direction
//Makes 00 pulses for making one full cycle rotation

for(int x=0;x<100; x++){

digitalWrite(stepPin,HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);

}
delay(500);
lcd.setCursor(2,1); //column ,row
lcd.print(Bottle 6/6);
digitalWrite(m,HIGH);
delay(1850);
digitalWrite(m,LOW);
delay(1000);//one second delay
tone(buzzer,1000);
delay(200);
noTone(buzzer);
}
{
tone(buzzer,800);
delay(1000);
noTone(buzzer);
lcd.clear();
lcd.setCursor(0,0);//column,row
lcd.print(*Job Done!Place New Bottles);

}
}

automatic_bottle_filing.ino (4.35 KB)

Please always do an Auto Format (Tools > Auto Format in the Arduino IDE or Ctrl + B in the Arduino Web Editor) on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.

Please use code tags when you post code or warning/error messages. To do this, click the </> button on the forum toolbar, then paste the text you want to be in the code tags. Finally, move the cursor out of the code tags before adding any additional text you don't want to be in the code tags. If your browser doesn't show the posting toolbar, then you can manually add the code tags like this:
[code]``[color=blue]// your code is here[/color]``[/code]

The reason for doing this is that, without code tags, the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier for us to read your code and to copy it to the IDE or editor.

Using code tags and other important information is explained in the "How to use this forum" post. Please read it.

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

Also try to post the shortest code example that exhibits your problem.

Don

@Umashankar7631

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum.

Bob.

Post the error measage in code tags after you fix your original post. Post the entire message. Do not paraphrase.

There are MANY libraries out there that have a LiquidCrystal_I2C class and they don't all work the same.
Many of them used the LCD API 1.0 init() function to initialize the library rather than the LiquidCrystal API begin() function.
It is possible that you have one of libraries that does not have support for a begin() function.

While there is a LiquidCrystal_I2C library in the IDE library manager and the code has been updated to support/include a begin() function, I believe that the git repository for that library is still messed up and fixed version of the library is not available through the IDE library manager.

My advice would be use the hd44780 library and the hd44780_I2Cexp i/o class.
It is available in the IDE library manager so there is no need to do any sort of downloading or use a zip file.
After you install the library run the included diagnostic sketch, I2CexpDiag, to test that everything is working.
Then you can look at the other hd44780_I2Cexp i/o class examples.
There is lots of documentation available that can be accessed using the included Documentation example sketch.

You see additional information about the library on its github page: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library

--- bill