On this tutorial, we will learn how to use a standard 16x2 LCD with Arduino, but using just 2 pins. The magic behind is done by the PCF8574, an I/O expander that communicates with the micro-controller by I2C. If you want to learn about the PCF8574, check this previous tutorial.
Firstly, you have to download the library, there are different downloads for the 1.0 and 0022 Arduino versions:
After that, extract the files to your libraries folder inside your Arduino installation.
Get your breadboard and build the circuit show in the first picture.
Open your Arduino IDE and go to File > Examples > LiquidCrystal_I2C and select "Hello World". The following code will open:
LiquidCrystal_I2C lcd(32,16,2); // set the LCD address to 0x20 for a 16 chars and 2 line display
lcd.init(); // initialize the lcd
// Print a message to the LCD.
Upload your code. You may need to turn the potentiometer to adjust the LCD contrast. You now show see the words "Hello, world!" on your display.