Hi have just published a library that is fully compatible with the current "LiquidCrystal" library that comes as standard with the Arduino SDK.
The main difference with the standard library is that it is supposed to be a generic and extendible library to control most LCD based on the Hitachi HD44780 (most alpha-numeric LCDs these days) using a wider range of "physical interfaces": 4 or 8 bit parallel, I2C, SPI, Serial.
The first version of the library supports the same functionality and interface as the "LiquidCrystal" library and with the very same interface and also allows you to control them via the I2C bus using an IO expander board. This means that you can control an LCD with just 2 Arduino pins as opposed to 7 or 11. You can even chain up to 8 LCDs on the same I2C bus should your application need it (using the I2CLCDextraIO board).
The New Liquid Crystal library is in fact a class hierarchy, where the base class is an abstract class "LiquidCrystal". Therefore, any project that you have developed is fully compatible with this library by just changing two lines of code (an include and the object creation - variable creation).
The advantages:
- It is a bit faster that the standard LiquidCrystal
- Your projects can swap in and out LCDs that use an IO expander board, you are not constraint by library availability with different APIs.
- The library is extendable, therefore it can grow to support new LCD control devices such as I2C, SPI, Serial, 1wire, RF, CAM, ...
- Since the base class is abstract, anyone developing a MMI or user interface for their project, they can simply code the entire application with a reference to the class without constraining the users to have a particular LCD control mechanism. The type of LCD used is defined in the setup of the sketch.
- The performance of the I2C driven interface is very good, you can even do animations with it.
- The library is also compatible with the new release of the Arduino SKD 1.0-rc2 and will support the final release.
If you have run out of IO pins in your application, you can always use an I2C IO expander like the I2CLCDextraIO (image attached).
The library has been tested with several LCDs based on the Hitachi HD44780 and the I2CLCDextraIO board.
You can download the documentation and library from: https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
I hope that you find it use full.
This work was inspired on the Arduino SKD "LiquidCrystal" library and the "LiquidCrystal_I2C" library from Mario_H.