Commits

F Malpartida committed fa29c0f

Edited online

  • Participants
  • Parent commits ea37c87

Comments (0)

Files changed (1)

 * 4 bit parallel LCD interface
 * 8 bit parallel LCD interface
 * I2C IO bus expansion board with the PCF8574* I2C IO expander ASIC.
+* ShiftRegister adaptor board as described [[http://code.google.com/p/arduinoshiftreglcd/|Shift Register project home]] - Not tested yet.
 
 The code has been fully tested with 4 bit interface and with the **I2CLCDextraIO** (companion board to this library) using the PCF8574* ASIC.
 
 #!c++
 
 #include <LiquidCrystal.h>
-#include <LiquidCrystal_4bit.h>
 
-LiquidCrystal_4bit lcd(12, 11, 5, 4, 3, 2);
+LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
 #define   CONTRAST_PIN   9
 #define   BACKLIGHT_PIN  7
 #define   CONTRAST       125
 }
 }}}
 
+Using the virtual LCD class in projects:
+{{{
+#!c++
+
+{{{
+#!c++
+#include <Wire.h>
+#include <LCD.h>
+#include <LiquidCrystal_I2C.h>
+
+#define BACKLIGHT_PIN     13
+
+LiquidCrystal_I2C lcd(0x38);  // Set the LCD I2C address
+LCD *myLCD = &lcd;
+
+void setup()
+{
+  // Switch on the backlight
+  pinMode ( BACKLIGHT_PIN, OUTPUT );
+  digitalWrite ( BACKLIGHT_PIN, HIGH );
+  
+  myLcd->begin(16,2);               // initialize the lcd 
+
+  myLcd->home ();                   // go home
+  myLcd->print("Hello, ARDUINO ");  
+  myLcd->setCursor ( 0, 1 );        // go to the next line
+  myLcd->print (" WORLD!  ");      
+}
+
+void loop()
+{
+
+}
+}}}
+
 The only difference is the "include" and how you initialize the LCD.
 
 === Version ===
 * Download the most current version of the library.
 * Extract the library. It should be in a subfolder of its own (something like /myLCDSketch/libraries/LCD) in your sketch or in the library folder of the Arduino distribution.
 * When you start the Arduino IDE, it should contain a new menu "LCD" with examples. (File > Examples > LCD...). It should also appear in the menu Sketch > import library.
+* Alternatively you can install the library in the Arduino SDK library pool. To install and learn about libraries please follow the instructions in [[http://www.arduino.cc/playground/Code/Library|Library Tutorial]], there is a Section in the Tutorial indicating how to install a library.
 
-* To install and learn about libraries please follow the instructions in [[http://www.arduino.cc/playground/Code/Library|Library Tutorial]], there is a Section in the Tutorial indicating how to install a library.
-
-The library has been developed to replace the current Arduino library, therefore you will need to remove from the Arduino library folder the original LiquidCrystal library and replace it for this one.
+//The library has been developed to replace the current Arduino library, therefore you will need to remove from the Arduino library folder the original LiquidCrystal library and replace it for this one.//
 
 Also in the download section you can find the [[I2CIO|I2CIO driver library]] for the PCF8574* I2C IO expander ASIC. The library has been tested with the **LCDI2CextraIO** board.