F Malpartida avatar F Malpartida committed 3baf9ad

Added full compatibility support with the current LiquidCrystal library.

Comments (0)

Files changed (8)

+// ---------------------------------------------------------------------------
+// Created by Francisco Malpartida on 20/08/11.
+// Copyright 2011 - Under creative commons license 3.0:
+//        Attribution-ShareAlike CC BY-SA
+//
+// This software is furnished "as is", without technical support, and with no 
+// warranty, express or implied, as to its usefulness for any purpose.
+//
+// Thread Safe: No
+// Extendable: Yes
+//
+// @file HD44780.h
+// This file implements a basic liquid crystal library that comes as standard
+// in the Arduino SDK.
+// 
+// @brief 
+// This is a basic implementation of the HD44780 library of the
+// Arduino SDK. This library is a refactored version of the one supplied
+// in the Arduino SDK in such a way that it simplifies its extension
+// to support other mechanism to communicate to LCDs such as I2C, Serial.
+// The original library has been reworked in such a way that this will be
+// the base class implementing all generic methods to command an LCD based
+// on the Hitachi HD44780 and compatible chipsets.
+//
+// This base class is a pure abstract class and needs to be extended. As reference,
+// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension
+// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.
+//
+//
+// This library is only compatible with Arduino's SDK version 1.0
+//
+// @version API 1.0.0
+//
+// @author F. Malpartida - fmalpartida@gmail.com
+// ---------------------------------------------------------------------------
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+
+#include <Arduino.h>
+#include <LCD.h>
+
+// CLASS CONSTRUCTORS
+// ---------------------------------------------------------------------------
+
+// Constructor
+LCD::LCD () 
+{
+   
+}
+
+// PUBLIC METHODS
+// ---------------------------------------------------------------------------
+
+// Common LCD Commands
+// ---------------------------------------------------------------------------
+void LCD::clear()
+{
+   command(LCD_CLEARDISPLAY);  // clear display, set cursor position to zero
+   delayMicroseconds(2000);    // this command is time consuming
+}
+
+void LCD::home()
+{
+   command(LCD_RETURNHOME);  // set cursor position to zero
+   delayMicroseconds(2000);  // This command is time consuming
+}
+
+void LCD::setCursor(uint8_t col, uint8_t row)
+{
+   int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
+   
+   if ( row > _numlines ) 
+   {
+      row = _numlines-1;    // rows start at 0
+   }
+   
+   command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
+}
+
+// Turn the display on/off
+void LCD::noDisplay() 
+{
+   _displaycontrol &= ~LCD_DISPLAYON;
+   command(LCD_DISPLAYCONTROL | _displaycontrol);
+}
+
+void LCD::display() 
+{
+   _displaycontrol |= LCD_DISPLAYON;
+   command(LCD_DISPLAYCONTROL | _displaycontrol);
+}
+
+// Turns the underline cursor on/off
+void LCD::noCursor() 
+{
+   _displaycontrol &= ~LCD_CURSORON;
+   command(LCD_DISPLAYCONTROL | _displaycontrol);
+}
+void LCD::cursor() 
+{
+   _displaycontrol |= LCD_CURSORON;
+   command(LCD_DISPLAYCONTROL | _displaycontrol);
+}
+
+// Turns on/off the blinking cursor
+void LCD::noBlink() 
+{
+   _displaycontrol &= ~LCD_BLINKON;
+   command(LCD_DISPLAYCONTROL | _displaycontrol);
+}
+
+void LCD::blink() 
+{
+   _displaycontrol |= LCD_BLINKON;
+   command(LCD_DISPLAYCONTROL | _displaycontrol);
+}
+
+// These commands scroll the display without changing the RAM
+void LCD::scrollDisplayLeft(void) 
+{
+   command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
+}
+
+void LCD::scrollDisplayRight(void) {
+   command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
+}
+
+// This is for text that flows Left to Right
+void LCD::leftToRight(void) 
+{
+   _displaymode |= LCD_ENTRYLEFT;
+   command(LCD_ENTRYMODESET | _displaymode);
+}
+
+// This is for text that flows Right to Left
+void LCD::rightToLeft(void) 
+{
+   _displaymode &= ~LCD_ENTRYLEFT;
+   command(LCD_ENTRYMODESET | _displaymode);
+}
+
+// This will 'right justify' text from the cursor
+void LCD::autoscroll(void) 
+{
+   _displaymode |= LCD_ENTRYSHIFTINCREMENT;
+   command(LCD_ENTRYMODESET | _displaymode);
+}
+
+// This will 'left justify' text from the cursor
+void LCD::noAutoscroll(void) 
+{
+   _displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
+   command(LCD_ENTRYMODESET | _displaymode);
+}
+
+// Write to CGRAM of new characters
+void LCD::createChar(uint8_t location, uint8_t charmap[]) 
+{
+   location &= 0x7;            // we only have 8 locations 0-7
+   
+   command(LCD_SETCGRAMADDR | (location << 3));
+   for (int i=0; i<8; i++) 
+   {
+      write(charmap[i]);      // call the virtual write method
+   }
+}
+
+// General LCD commands - generic methods used by the rest of the commands
+// ---------------------------------------------------------------------------
+void LCD::command(uint8_t value) 
+{
+   send(value, LOW);
+}
+
+size_t LCD::write(uint8_t value) 
+{
+   send(value, HIGH);
+   
+   return 1;           // assume OK
+}
+// ---------------------------------------------------------------------------
+// Created by Francisco Malpartida on 20/08/11.
+// Copyright 2011 - Under creative commons license 3.0:
+//        Attribution-ShareAlike CC BY-SA
+//
+// This software is furnished "as is", without technical support, and with no 
+// warranty, express or implied, as to its usefulness for any purpose.
+//
+// Thread Safe: No
+// Extendable: Yes
+//
+// @file LiquidCrystal.h
+// This file implements a basic liquid crystal library that comes as standard
+// in the Arduino SDK.
+// 
+// @brief 
+// This is a basic implementation of the LiquidCrystal library of the
+// Arduino SDK. This library is a refactored version of the one supplied
+// in the Arduino SDK in such a way that it simplifies its extension
+// to support other mechanism to communicate to LCDs such as I2C, Serial.
+// The original library has been reworked in such a way that this will be
+// the base class implementing all generic methods to command an LCD based
+// on the Hitachi HD44780 and compatible chipsets.
+//
+// This base class is a pure abstract class and needs to be extended. As reference,
+// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension
+// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.
+//
+//
+// This library is only compatible with Arduino's SDK version 1.0
+//
+// @version API 1.0.0
+//
+//
+// @author F. Malpartida - fmalpartida@gmail.com
+// ---------------------------------------------------------------------------
+#ifndef _LCD_H_
+#define _LCD_H_
+
+#include <inttypes.h>
+#include <Print.h>
+
+
+/*!
+ @defined 
+ @abstract   All these definitions shouldn't be used unless you are writing 
+ a driver.
+ @discussion All these definitions are for driver implementation only and
+ shouldn't be used by applications.
+ */
+// LCD Commands
+// ---------------------------------------------------------------------------
+#define LCD_CLEARDISPLAY        0x01
+#define LCD_RETURNHOME          0x02
+#define LCD_ENTRYMODESET        0x04
+#define LCD_DISPLAYCONTROL      0x08
+#define LCD_CURSORSHIFT         0x10
+#define LCD_FUNCTIONSET         0x20
+#define LCD_SETCGRAMADDR        0x40
+#define LCD_SETDDRAMADDR        0x80
+
+// flags for display entry mode
+// ---------------------------------------------------------------------------
+#define LCD_ENTRYRIGHT          0x00
+#define LCD_ENTRYLEFT           0x02
+#define LCD_ENTRYSHIFTINCREMENT 0x01
+#define LCD_ENTRYSHIFTDECREMENT 0x00
+
+// flags for display on/off and cursor control
+// ---------------------------------------------------------------------------
+#define LCD_DISPLAYON           0x04
+#define LCD_DISPLAYOFF          0x00
+#define LCD_CURSORON            0x02
+#define LCD_CURSOROFF           0x00
+#define LCD_BLINKON             0x01
+#define LCD_BLINKOFF            0x00
+
+// flags for display/cursor shift
+// ---------------------------------------------------------------------------
+#define LCD_DISPLAYMOVE         0x08
+#define LCD_CURSORMOVE          0x00
+#define LCD_MOVERIGHT           0x04
+#define LCD_MOVELEFT            0x00
+
+// flags for function set
+// ---------------------------------------------------------------------------
+#define LCD_8BITMODE            0x10
+#define LCD_4BITMODE            0x00
+#define LCD_2LINE               0x08
+#define LCD_1LINE               0x00
+#define LCD_5x10DOTS            0x04
+#define LCD_5x8DOTS             0x00
+
+class LCD : public Print 
+{
+public:
+   
+   /*!
+    @method
+    @abstract   LiquidCrystal abstract constructor.
+    @discussion LiquidCrystal class abstract constructor needed to create
+    the base abstract class.
+    */
+   LCD ( );
+   
+   /*!
+    @function
+    @abstract   LCD initialization.
+    @discussion Initializes the LCD to a given size (col, row). This methods
+    initializes the LCD, therefore, it MUST be called prior to using any other
+    method from this class.
+    
+    This method is pure abstract, it is dependent on each derived class from
+    this base class to implement the internals of how the LCD is initialized
+    and configured.
+    
+    @param      cols the number of columns that the display has
+    @param      rows the number of rows that the display has
+    */
+   virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS) = 0;
+   
+   /*!
+    @function
+    @abstract   Clears the LCD.
+    @discussion Clears the LCD screen and positions the cursor in the upper-left 
+    corner. 
+    
+    This operation is time consuming for the LCD.
+    
+    @param      none
+    */
+   void clear();
+   
+   /*!
+    @function
+    @abstract   Sets the cursor to the upper-left corner.
+    @discussion Positions the cursor in the upper-left of the LCD. 
+    That is, use that location in outputting subsequent text to the display. 
+    To also clear the display, use the clear() function instead.
+    
+    This operation is time consuming for the LCD.
+    
+    @param      none
+    */
+   void home();
+   
+   /*!
+    @function
+    @abstract   Turns off the LCD display.
+    @discussion Turns off the LCD display, without losing the text currently 
+    being displayed on it.
+    
+    @param      none
+    */
+   void noDisplay();
+   
+   /*!
+    @function
+    @abstract   Turns on the LCD display.
+    @discussion Turns on the LCD display, after it's been turned off with 
+    noDisplay(). This will restore the text (and cursor location) that was on 
+    the display prior to calling noDisplay().
+    
+    @param      none
+    */
+   void display();
+   
+   /*!
+    @function
+    @abstract   Turns off the blinking of the LCD cursor.
+    
+    @param      none
+    */
+   void noBlink();
+   
+   /*!
+    @function
+    @abstract   Display the cursor of the LCD.
+    @discussion Display the blinking LCD cursor. If used in combination with 
+    the cursor() function, the result will depend on the particular display.
+    
+    @param      none
+    */
+   void blink();
+   
+   /*!
+    @function
+    @abstract   Hides the LCD cursor.
+    
+    @param      none
+    */
+   void noCursor();
+   
+   /*!
+    @function
+    @abstract   Display the LCD cursor.
+    @discussion Display the LCD cursor: an underscore (line) at the location 
+    where the next character will be written.
+    
+    @param      none
+    */
+   void cursor();
+   
+   /*!
+    @function
+    @abstract   Scrolls the contents of the display (text and cursor) one space 
+    to the left.
+    
+    @param      none
+    */
+   void scrollDisplayLeft();
+   
+   /*!
+    @function
+    @abstract   Scrolls the contents of the display (text and cursor) one space 
+    to the right.
+    
+    @param      none
+    */
+   void scrollDisplayRight();
+   
+   /*!
+    @function
+    @abstract   Set the direction for text written to the LCD to left-to-right.
+    @discussion Set the direction for text written to the LCD to left-to-right. 
+    All subsequent characters written to the display will go from left to right, 
+    but does not affect previously-output text.
+    
+    This is the default configuration.
+    
+    @param      none
+    */
+   void leftToRight();
+   
+   /*!
+    @function
+    @abstract   Set the direction for text written to the LCD to right-to-left.
+    @discussion Set the direction for text written to the LCD to right-to-left. 
+    All subsequent characters written to the display will go from right to left, 
+    but does not affect previously-output text.
+    
+    left-to-right is the default configuration.
+    
+    @param      none
+    */
+   void rightToLeft();
+   
+   /*!
+    @function
+    @abstract   Turns on automatic scrolling of the LCD.
+    @discussion Turns on automatic scrolling of the LCD. This causes each 
+    character output to the display to push previous characters over by one 
+    space. If the current text direction is left-to-right (the default), 
+    the display scrolls to the left; if the current direction is right-to-left, 
+    the display scrolls to the right. 
+    This has the effect of outputting each new character to the same location on 
+    the LCD.
+    
+    @param      none
+    */
+   void autoscroll();
+   
+   /*!
+    @function
+    @abstract   Turns off automatic scrolling of the LCD.
+    @discussion Turns off automatic scrolling of the LCD, this is the default
+    configuration of the LCD.
+    
+    @param      none
+    */
+   void noAutoscroll();
+   
+   /*!
+    @function
+    @abstract   Creates a custom character for use on the LCD.
+    @discussion Create a custom character (glyph) for use on the LCD. 
+    Most chipsets only support up to eight characters of 5x8 pixels. Therefore,
+    this methods has been limited to locations (numbered 0 to 7). 
+    
+    The appearance of each custom character is specified by an array of eight 
+    bytes, one for each row. The five least significant bits of each byte 
+    determine the pixels in that row. To display a custom character on screen, 
+    write()/print() its number, i.e. lcd.print (char(x)); // Where x is 0..7.
+    
+    @param      location: LCD memory location of the character to create
+    (0 to 7)
+    @param      charmap: the bitmap array representing each row of the character.
+    */
+   void createChar(uint8_t location, uint8_t charmap[]);
+   
+   /*!
+    @function
+    @abstract   Position the LCD cursor.
+    @discussion Sets the position of the LCD cursor. Set the location at which 
+    subsequent text written to the LCD will be displayed.
+    
+    @param      col LCD column
+    @param      row LCD row - line.
+    */
+   void setCursor(uint8_t col, uint8_t row);
+   
+   
+   /*!
+    @function
+    @abstract   Send a command to the LCD.
+    @discussion This method sends a command to the LCD by setting the Register
+    select line of the LCD.
+    
+    This command shouldn't be used to drive the LCD, only to implement any other
+    feature that is not available on this library.
+    
+    @param      value Command value to send to the LCD.
+    */
+   void command(uint8_t value);
+   
+   /*!
+    @function
+    @abstract   Writes to the LCD.
+    @discussion This method writes character to the LCD in the current cursor
+    position.
+    
+    This is the virtual write method, implemented in the Print class, therefore
+    all Print class methods will end up calling this method.
+    
+    @param      value Value to write to the LCD.
+    */
+   size_t write(uint8_t value);
+   
+   /*!
+    @function
+    @abstract   Send a particular value to the LCD.
+    @discussion Sends a particular value to the LCD. This is a pure abstract
+    method, therefore, it is implementation dependent of each derived class how
+    to physically write to the LCD.
+    
+    Users should never call this method.
+    
+    @param      value Value to send to the LCD.
+    @result     mode LOW - write to the LCD CGRAM, HIGH - write a command to
+    the LCD.
+    */
+   virtual void send(uint8_t value, uint8_t mode) = 0;
+   
+   using Print::write;
+   
+protected:
+   // Internal LCD variables to control the LCD shared between all derived
+   // classes.
+   uint8_t _displayfunction;  // LCD_5x10DOTS or LCD_5x8DOTS, LCD_4BITMODE or 
+   // LCD_8BITMODE, LCD_1LINE or LCD_2LINE
+   uint8_t _displaycontrol;   // LCD base control command LCD on/off, blink, cursor
+   // all commands are "ored" to its contents.
+   uint8_t _displaymode;      // Text entry mode to the LCD
+   uint8_t _numlines;         // Number of lines of the LCD, initialized with begin()
+   
+private:
+   
+};
+
+#endif

LiquidCrystal.cpp

 // Created by Francisco Malpartida on 20/08/11.
 // Copyright 2011 - Under creative commons license 3.0:
 //        Attribution-ShareAlike CC BY-SA
-//
+//LiquidCrystal
 // This software is furnished "as is", without technical support, and with no 
 // warranty, express or implied, as to its usefulness for any purpose.
 //
 // Thread Safe: No
 // Extendable: Yes
 //
-// @file LiquidCrystal.h
+// @file LiquidCrystal.cpp
 // This file implements a basic liquid crystal library that comes as standard
 // in the Arduino SDK.
 // 
 // @brief 
 // This is a basic implementation of the LiquidCrystal library of the
-// Arduino SDK. This library is a refactored version of the one supplied
-// in the Arduino SDK in such a way that it simplifies its extension
-// to support other mechanism to communicate to LCDs such as I2C, Serial.
-// The original library has been reworked in such a way that this will be
-// the base class implementing all generic methods to command an LCD based
-// on the Hitachi HD44780 and compatible chipsets.
+// Arduino SDK. The original library has been reworked in such a way that 
+// this class implements the all methods to command an LCD based
+// on the Hitachi HD44780 and compatible chipsets using the parallel port of
+// the LCD (4 bit and 8 bit).
 //
-// This base class is a pure abstract class and needs to be extended. As reference,
-// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension
-// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.
+// The functionality provided by this class and its base class is identical
+// to the original functionality of the Arduino LiquidCrystal library.
 //
 //
 // This library is only compatible with Arduino's SDK version 1.0
 //
-// @version API 1.0.0
 //
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
-
 #include <Arduino.h>
 #include <LiquidCrystal.h>
 
-// CLASS CONSTRUCTORS
+// When the display powers up, it is configured as follows:
+//
+// 1. Display clear
+// 2. Function set: 
+//    DL = 1; 8-bit interface data 
+//    N = 0; 1-line display 
+//    F = 0; 5x8 dot character font 
+// 3. Display on/off control: 
+//    D = 0; Display off 
+//    C = 0; Cursor off 
+//    B = 0; Blinking off 
+// 4. Entry mode set: 
+//    I/D = 1; Increment by 1 
+//    S = 0; No shift 
+//
+// Note, however, that resetting the Arduino doesn't reset the LCD, so we
+// can't assume that its in that state when a sketch starts (and the
+// LiquidCrystal constructor is called).
+// A call to begin() will reinitialize the LCD.
+
+
+// CONSTRUCTORS
+// ---------------------------------------------------------------------------
+LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
+                             uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+                             uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
+{
+   init(0, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
+}
+
+LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
+                             uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+                             uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
+{
+   init(0, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
+}
+
+LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
+                             uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
+{
+   init(1, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
+}
+
+LiquidCrystal::LiquidCrystal(uint8_t rs,  uint8_t enable,
+                             uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
+{
+   init(1, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
+}
+
+// PRIVATE METHODS
 // ---------------------------------------------------------------------------
 
-// Constructor
-LiquidCrystal::LiquidCrystal () 
+//
+// init
+void LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
+                         uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+                         uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
 {
-
+   uint8_t i;
+   
+   // Initialize the IO pins
+   // -----------------------
+   
+   _rs_pin = rs;
+   _rw_pin = rw;
+   _enable_pin = enable;
+   
+   _data_pins[0] = d0;
+   _data_pins[1] = d1;
+   _data_pins[2] = d2;
+   _data_pins[3] = d3; 
+   _data_pins[4] = d4;
+   _data_pins[5] = d5;
+   _data_pins[6] = d6;
+   _data_pins[7] = d7;
+   
+   // Initialize the IO port direction to OUTPUT
+   // ------------------------------------------
+   
+   for ( uint8_t i = 0; i < 4; i++ )
+   {
+      pinMode ( _data_pins[i], OUTPUT );
+   }
+   
+   // Initialize the rest of the ports if it is an 8bit controlled LCD
+   // ----------------------------------------------------------------
+   
+   if ( !fourbitmode )
+   {
+      for ( uint8_t i = 4; i < 7; i++ )
+      {
+         pinMode ( _data_pins[i], OUTPUT );
+      }
+   }
+   pinMode(_rs_pin, OUTPUT);
+   
+   // we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#
+   if (_rw_pin != 255) 
+   { 
+      pinMode(_rw_pin, OUTPUT);
+   }
+   
+   pinMode(_enable_pin, OUTPUT);
+   
+   // Initialise displaymode functions to defaults: LCD_1LINE and LCD_5x8DOTS
+   // -------------------------------------------------------------------------
+   if (fourbitmode)
+      _displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
+   else 
+      _displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
 }
 
 // PUBLIC METHODS
 // ---------------------------------------------------------------------------
 
-// Common LCD Commands
-// ---------------------------------------------------------------------------
-void LiquidCrystal::clear()
+//
+// begin
+void LiquidCrystal::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) 
 {
-   command(LCD_CLEARDISPLAY);  // clear display, set cursor position to zero
-   delayMicroseconds(2000);    // this command is time consuming
+   if (lines > 1) 
+   {
+      _displayfunction |= LCD_2LINE;
+   }
+   _numlines = lines;
+   
+   // for some 1 line displays you can select a 10 pixel high font
+   // ------------------------------------------------------------
+   if ((dotsize != 0) && (lines == 1)) 
+   {
+      _displayfunction |= LCD_5x10DOTS;
+   }
+   
+   // SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
+   // according to datasheet, we need at least 40ms after power rises above 2.7V
+   // before sending commands. Arduino can turn on way before 4.5V so we'll wait 
+   // 50
+   // ---------------------------------------------------------------------------
+   delayMicroseconds(50000); 
+   
+   // Now we pull both RS and R/W low to begin commands
+   digitalWrite(_rs_pin, LOW);
+   digitalWrite(_enable_pin, LOW);
+   
+   if (_rw_pin != 255) 
+   { 
+      digitalWrite(_rw_pin, LOW);
+   }
+   
+   //put the LCD into 4 bit or 8 bit mode
+   // -------------------------------------
+   if (! (_displayfunction & LCD_8BITMODE)) 
+   {
+      // this is according to the hitachi HD44780 datasheet
+      // figure 24, pg 46
+      
+      // we start in 8bit mode, try to set 4 bit mode
+      write4bits(0x03);
+      delayMicroseconds(4500); // wait min 4.1ms
+      
+      // second try
+      write4bits(0x03);
+      delayMicroseconds(4500); // wait min 4.1ms
+      
+      // third go!
+      write4bits(0x03); 
+      delayMicroseconds(150);
+      
+      // finally, set to 4-bit interface
+      write4bits(0x02); 
+   } 
+   else 
+   {
+      // this is according to the hitachi HD44780 datasheet
+      // page 45 figure 23
+      
+      // Send function set command sequence
+      command(LCD_FUNCTIONSET | _displayfunction);
+      delayMicroseconds(4500);  // wait more than 4.1ms
+      
+      // second try
+      command(LCD_FUNCTIONSET | _displayfunction);
+      delayMicroseconds(150);
+      
+      // third go
+      command(LCD_FUNCTIONSET | _displayfunction);
+   }
+   
+   // finally, set # lines, font size, etc.
+   command(LCD_FUNCTIONSET | _displayfunction);  
+   
+   // turn the display on with no cursor or blinking default
+   _displaycontrol = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;  
+   display();
+   
+   // clear the LCD
+   clear();
+   
+   // Initialize to default text direction (for romance languages)
+   _displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
+   // set the entry mode
+   command(LCD_ENTRYMODESET | _displaymode);
+   
 }
 
-void LiquidCrystal::home()
+/************ low level data pushing commands **********/
+
+// send
+void LiquidCrystal::send(uint8_t value, uint8_t mode) 
 {
-   command(LCD_RETURNHOME);  // set cursor position to zero
-   delayMicroseconds(2000);  // This command is time consuming
-}
-
-void LiquidCrystal::setCursor(uint8_t col, uint8_t row)
-{
-   int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
+   digitalWrite(_rs_pin, mode);
    
-   if ( row > _numlines ) 
-   {
-      row = _numlines-1;    // rows start at 0
+   // if there is a RW pin indicated, set it low to Write
+   // ---------------------------------------------------
+   if (_rw_pin != 255) 
+   { 
+      digitalWrite(_rw_pin, LOW);
    }
    
-   command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
-}
-
-// Turn the display on/off
-void LiquidCrystal::noDisplay() 
-{
-   _displaycontrol &= ~LCD_DISPLAYON;
-   command(LCD_DISPLAYCONTROL | _displaycontrol);
-}
-
-void LiquidCrystal::display() 
-{
-   _displaycontrol |= LCD_DISPLAYON;
-   command(LCD_DISPLAYCONTROL | _displaycontrol);
-}
-
-// Turns the underline cursor on/off
-void LiquidCrystal::noCursor() 
-{
-   _displaycontrol &= ~LCD_CURSORON;
-   command(LCD_DISPLAYCONTROL | _displaycontrol);
-}
-void LiquidCrystal::cursor() 
-{
-   _displaycontrol |= LCD_CURSORON;
-   command(LCD_DISPLAYCONTROL | _displaycontrol);
-}
-
-// Turns on/off the blinking cursor
-void LiquidCrystal::noBlink() 
-{
-   _displaycontrol &= ~LCD_BLINKON;
-   command(LCD_DISPLAYCONTROL | _displaycontrol);
-}
-
-void LiquidCrystal::blink() 
-{
-   _displaycontrol |= LCD_BLINKON;
-   command(LCD_DISPLAYCONTROL | _displaycontrol);
-}
-
-// These commands scroll the display without changing the RAM
-void LiquidCrystal::scrollDisplayLeft(void) 
-{
-   command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
-}
-
-void LiquidCrystal::scrollDisplayRight(void) {
-   command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
-}
-
-// This is for text that flows Left to Right
-void LiquidCrystal::leftToRight(void) 
-{
-   _displaymode |= LCD_ENTRYLEFT;
-   command(LCD_ENTRYMODESET | _displaymode);
-}
-
-// This is for text that flows Right to Left
-void LiquidCrystal::rightToLeft(void) 
-{
-   _displaymode &= ~LCD_ENTRYLEFT;
-   command(LCD_ENTRYMODESET | _displaymode);
-}
-
-// This will 'right justify' text from the cursor
-void LiquidCrystal::autoscroll(void) 
-{
-   _displaymode |= LCD_ENTRYSHIFTINCREMENT;
-   command(LCD_ENTRYMODESET | _displaymode);
-}
-
-// This will 'left justify' text from the cursor
-void LiquidCrystal::noAutoscroll(void) 
-{
-   _displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
-   command(LCD_ENTRYMODESET | _displaymode);
-}
-
-// Write to CGRAM of new characters
-void LiquidCrystal::createChar(uint8_t location, uint8_t charmap[]) 
-{
-   location &= 0x7;            // we only have 8 locations 0-7
-
-   command(LCD_SETCGRAMADDR | (location << 3));
-   for (int i=0; i<8; i++) 
+   if (_displayfunction & LCD_8BITMODE)
    {
-      write(charmap[i]);      // call the virtual write method
+      write8bits(value); 
+   } 
+   else 
+   {
+      write4bits(value>>4);
+      write4bits(value);
    }
 }
 
-// General LCD commands - generic methods used by the rest of the commands
-// ---------------------------------------------------------------------------
-void LiquidCrystal::command(uint8_t value) 
+//
+// pulseEnable
+void LiquidCrystal::pulseEnable(void) 
 {
-   send(value, LOW);
+   digitalWrite(_enable_pin, LOW);
+   delayMicroseconds(1);
+   
+   digitalWrite(_enable_pin, HIGH);
+   delayMicroseconds(1);           // enable pulse must be > 450ns
+   
+   digitalWrite(_enable_pin, LOW);
+   delayMicroseconds(100);         // commands need > 37us to settle
 }
 
-size_t LiquidCrystal::write(uint8_t value) 
+//
+// write4bits
+void LiquidCrystal::write4bits(uint8_t value) 
 {
-   send(value, HIGH);
+   for (uint8_t i = 0; i < 4; i++) 
+   {
+      digitalWrite(_data_pins[i], (value >> i) & 0x01);
+   }
    
-   return 1;           // assume OK
-}
+   pulseEnable();
+}
+
+//
+// write8bits
+void LiquidCrystal::write8bits(uint8_t value) 
+{
+   for (uint8_t i = 0; i < 8; i++) 
+   {
+      digitalWrite(_data_pins[i], (value >> i) & 0x01);
+   }
+   
+   pulseEnable();
+}
 // 
 // @brief 
 // This is a basic implementation of the LiquidCrystal library of the
-// Arduino SDK. This library is a refactored version of the one supplied
-// in the Arduino SDK in such a way that it simplifies its extension
-// to support other mechanism to communicate to LCDs such as I2C, Serial.
-// The original library has been reworked in such a way that this will be
-// the base class implementing all generic methods to command an LCD based
-// on the Hitachi HD44780 and compatible chipsets.
+// Arduino SDK. The original library has been reworked in such a way that 
+// this class implements the all methods to command an LCD based
+// on the Hitachi HD44780 and compatible chipsets using the parallel port of
+// the LCD (4 bit and 8 bit).
 //
-// This base class is a pure abstract class and needs to be extended. As reference,
-// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension
-// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.
+// The functionality provided by this class and its base class is identical
+// to the original functionality of the Arduino LiquidCrystal library.
 //
 //
 // This library is only compatible with Arduino's SDK version 1.0
 //
-// @version API 1.0.0
-//
 //
 // @author F. Malpartida - fmalpartida@gmail.com
 // ---------------------------------------------------------------------------
-#ifndef LiquidCrystal_h
-#define LiquidCrystal_h
+#ifndef LiquidCrystal_4bit_h
+#define LiquidCrystal_4bit_h
 
 #include <inttypes.h>
-#include <Print.h>
+#include <LCD.h>
 
 
-/*!
-    @defined 
-    @abstract   All these definitions shouldn't be used unless you are writing 
-    a driver.
-    @discussion All these definitions are for driver implementation only and
-    shouldn't be used by applications.
-*/
-// LCD Commands
-// ---------------------------------------------------------------------------
-#define LCD_CLEARDISPLAY        0x01
-#define LCD_RETURNHOME          0x02
-#define LCD_ENTRYMODESET        0x04
-#define LCD_DISPLAYCONTROL      0x08
-#define LCD_CURSORSHIFT         0x10
-#define LCD_FUNCTIONSET         0x20
-#define LCD_SETCGRAMADDR        0x40
-#define LCD_SETDDRAMADDR        0x80
-
-// flags for display entry mode
-// ---------------------------------------------------------------------------
-#define LCD_ENTRYRIGHT          0x00
-#define LCD_ENTRYLEFT           0x02
-#define LCD_ENTRYSHIFTINCREMENT 0x01
-#define LCD_ENTRYSHIFTDECREMENT 0x00
-
-// flags for display on/off and cursor control
-// ---------------------------------------------------------------------------
-#define LCD_DISPLAYON           0x04
-#define LCD_DISPLAYOFF          0x00
-#define LCD_CURSORON            0x02
-#define LCD_CURSOROFF           0x00
-#define LCD_BLINKON             0x01
-#define LCD_BLINKOFF            0x00
-
-// flags for display/cursor shift
-// ---------------------------------------------------------------------------
-#define LCD_DISPLAYMOVE         0x08
-#define LCD_CURSORMOVE          0x00
-#define LCD_MOVERIGHT           0x04
-#define LCD_MOVELEFT            0x00
-
-// flags for function set
-// ---------------------------------------------------------------------------
-#define LCD_8BITMODE            0x10
-#define LCD_4BITMODE            0x00
-#define LCD_2LINE               0x08
-#define LCD_1LINE               0x00
-#define LCD_5x10DOTS            0x04
-#define LCD_5x8DOTS             0x00
-
-class LiquidCrystal : public Print 
+class LiquidCrystal : public LCD
 {
 public:
-
    /*!
-    @method
-    @abstract   LiquidCrystal abstract constructor.
-    @discussion LiquidCrystal class abstract constructor needed to create
-    the base abstract class.
+    @method     
+    @abstract   8 bit LCD constructors.
+    @discussion Defines the pin assignment that the LCD will have.
+    The constructor does not initialize the LCD.
     */
-   LiquidCrystal ( );
+   LiquidCrystal(uint8_t rs, uint8_t enable,
+                 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+                 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
+   LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
+                 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+                 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
+   
+   /*!
+    @method     
+    @abstract   4 bit LCD constructors.
+    @discussion Defines the pin assignment that the LCD will have.
+    The constructor does not initialize the LCD.
+    */
+   LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
+                 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
+   LiquidCrystal(uint8_t rs, uint8_t enable,
+                 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
+   
    
    /*!
     @function
     initializes the LCD, therefore, it MUST be called prior to using any other
     method from this class.
     
-    This method is pure abstract, it is dependent on each derived class from
-    this base class to implement the internals of how the LCD is initialized
-    and configured.
-    
-    @param      cols the number of columns that the display has
-    @param      rows the number of rows that the display has
+    @param      cols: the number of columns that the display has
+    @param      rows: the number of rows that the display has
+    @param      charsize: size of the characters of the LCD: LCD_5x8DOTS or
+    LCD_5x10DOTS.
     */
-   virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS) = 0;
-   
-   /*!
-    @function
-    @abstract   Clears the LCD.
-    @discussion Clears the LCD screen and positions the cursor in the upper-left 
-    corner. 
-    
-    This operation is time consuming for the LCD.
-    
-    @param      none
-    */
-   void clear();
-   
-   /*!
-    @function
-    @abstract   Sets the cursor to the upper-left corner.
-    @discussion Positions the cursor in the upper-left of the LCD. 
-    That is, use that location in outputting subsequent text to the display. 
-    To also clear the display, use the clear() function instead.
-    
-    This operation is time consuming for the LCD.
-    
-    @param      none
-   */
-   void home();
-   
-   /*!
-    @function
-    @abstract   Turns off the LCD display.
-    @discussion Turns off the LCD display, without losing the text currently 
-    being displayed on it.
-    
-    @param      none
-    */
-   void noDisplay();
-   
-   /*!
-    @function
-    @abstract   Turns on the LCD display.
-    @discussion Turns on the LCD display, after it's been turned off with 
-    noDisplay(). This will restore the text (and cursor location) that was on 
-    the display prior to calling noDisplay().
-
-    @param      none
-    */
-   void display();
-   
-   /*!
-    @function
-    @abstract   Turns off the blinking of the LCD cursor.
-    
-    @param      none
-    */
-   void noBlink();
-
-   /*!
-    @function
-    @abstract   Display the cursor of the LCD.
-    @discussion Display the blinking LCD cursor. If used in combination with 
-    the cursor() function, the result will depend on the particular display.
-
-    @param      none
-    */
-   void blink();
-   
-   /*!
-    @function
-    @abstract   Hides the LCD cursor.
-
-    @param      none
-    */
-   void noCursor();
-   
-   /*!
-    @function
-    @abstract   Display the LCD cursor.
-    @discussion Display the LCD cursor: an underscore (line) at the location 
-    where the next character will be written.
-    
-    @param      none
-    */
-   void cursor();
-   
-   /*!
-    @function
-    @abstract   Scrolls the contents of the display (text and cursor) one space 
-    to the left.
-
-    @param      none
-    */
-   void scrollDisplayLeft();
-   
-   /*!
-    @function
-    @abstract   Scrolls the contents of the display (text and cursor) one space 
-    to the right.
-
-    @param      none
-    */
-   void scrollDisplayRight();
-   
-   /*!
-    @function
-    @abstract   Set the direction for text written to the LCD to left-to-right.
-    @discussion Set the direction for text written to the LCD to left-to-right. 
-    All subsequent characters written to the display will go from left to right, 
-    but does not affect previously-output text.
-    
-    This is the default configuration.
-    
-    @param      none
-    */
-   void leftToRight();
-   
-   /*!
-    @function
-    @abstract   Set the direction for text written to the LCD to right-to-left.
-    @discussion Set the direction for text written to the LCD to right-to-left. 
-    All subsequent characters written to the display will go from right to left, 
-    but does not affect previously-output text.
-    
-    left-to-right is the default configuration.
-    
-    @param      none
-    */
-   void rightToLeft();
-   
-   /*!
-    @function
-    @abstract   Turns on automatic scrolling of the LCD.
-    @discussion Turns on automatic scrolling of the LCD. This causes each 
-    character output to the display to push previous characters over by one 
-    space. If the current text direction is left-to-right (the default), 
-    the display scrolls to the left; if the current direction is right-to-left, 
-    the display scrolls to the right. 
-    This has the effect of outputting each new character to the same location on 
-    the LCD.
-    
-    @param      none
-    */
-   void autoscroll();
-   
-   /*!
-    @function
-    @abstract   Turns off automatic scrolling of the LCD.
-    @discussion Turns off automatic scrolling of the LCD, this is the default
-    configuration of the LCD.
-
-    @param      none
-    */
-   void noAutoscroll();
-   
-   /*!
-    @function
-    @abstract   Creates a custom character for use on the LCD.
-    @discussion Create a custom character (glyph) for use on the LCD. 
-    Most chipsets only support up to eight characters of 5x8 pixels. Therefore,
-    this methods has been limited to locations (numbered 0 to 7). 
-    
-    The appearance of each custom character is specified by an array of eight 
-    bytes, one for each row. The five least significant bits of each byte 
-    determine the pixels in that row. To display a custom character on screen, 
-    write()/print() its number, i.e. lcd.print (char(x)); // Where x is 0..7.
-    
-    @param      location: LCD memory location of the character to create
-                (0 to 7)
-    @param      charmap: the bitmap array representing each row of the character.
-    */
-   void createChar(uint8_t location, uint8_t charmap[]);
-   
-   /*!
-    @function
-    @abstract   Position the LCD cursor.
-    @discussion Sets the position of the LCD cursor. Set the location at which 
-    subsequent text written to the LCD will be displayed.
-
-    @param      col LCD column
-    @param      row LCD row - line.
-    */
-   void setCursor(uint8_t col, uint8_t row);
-
-   
-   /*!
-    @function
-    @abstract   Send a command to the LCD.
-    @discussion This method sends a command to the LCD by setting the Register
-    select line of the LCD.
-    
-    This command shouldn't be used to drive the LCD, only to implement any other
-    feature that is not available on this library.
-    
-    @param      value Command value to send to the LCD.
-    */
-   void command(uint8_t value);
-
-   /*!
-    @function
-    @abstract   Writes to the LCD.
-    @discussion This method writes character to the LCD in the current cursor
-    position.
-    
-    This is the virtual write method, implemented in the Print class, therefore
-    all Print class methods will end up calling this method.
-
-    @param      value Value to write to the LCD.
-    */
-   size_t write(uint8_t value);
+   virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);   
    
    /*!
     @function
     @abstract   Send a particular value to the LCD.
-    @discussion Sends a particular value to the LCD. This is a pure abstract
-    method, therefore, it is implementation dependent of each derived class how
-    to physically write to the LCD.
+    @discussion Sends a particular value to the LCD for writing to the LCD or
+    as an LCD command.
     
     Users should never call this method.
     
     @result     mode LOW - write to the LCD CGRAM, HIGH - write a command to
     the LCD.
     */
-   virtual void send(uint8_t value, uint8_t mode) = 0;
-      
-   using Print::write;
+   virtual void send(uint8_t value, uint8_t mode);
    
-protected:
-   // Internal LCD variables to control the LCD shared between all derived
-   // classes.
-   uint8_t _displayfunction;  // LCD_5x10DOTS or LCD_5x8DOTS, LCD_4BITMODE or 
-                              // LCD_8BITMODE, LCD_1LINE or LCD_2LINE
-   uint8_t _displaycontrol;   // LCD base control command LCD on/off, blink, cursor
-                              // all commands are "ored" to its contents.
-   uint8_t _displaymode;      // Text entry mode to the LCD
-   uint8_t _numlines;         // Number of lines of the LCD, initialized with begin()
    
 private:
    
+   /*!
+    @method     
+    @abstract   Initializes the LCD pin allocation
+    @discussion Initializes the LCD pin allocation and configuration.
+    */
+   void init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
+             uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
+             uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
+   
+   /*!
+    @method     
+    @abstract   Writes an 8 bit value to the LCD.
+    @discussion Writes 8 bits to the LCD control data lines.
+    */
+   void write8bits(uint8_t value);
+   
+   /*!
+    @method     
+    @abstract   Writes an 4 bit value to the LCD.
+    @discussion Writes 4 bits (the least significant) to the LCD control data lines.
+    */   
+   void write4bits(uint8_t value);
+   
+   /*!
+    @method     
+    @abstract   Pulse the LCD enable line (En).
+    @discussion Sends a pulse of 1 uS to the Enable pin to execute an command
+    or write operation.
+    */ 
+   void pulseEnable();
+   
+   uint8_t _rs_pin;       // LOW: command.  HIGH: character.
+   uint8_t _rw_pin;       // LOW: write to LCD.  HIGH: read from LCD.
+   uint8_t _enable_pin;   // activated by a HIGH pulse.
+   uint8_t _data_pins[8]; // Data pins.
 };
 
 #endif

LiquidCrystal_I2C.cpp

 #include <inttypes.h>
 #include <Arduino.h>
 #include <I2CIO.h>
-#include <LiquidCrystal.h>
 #include <LiquidCrystal_I2C.h>
 
 
 // ---------------------------------------------------------------------------
 LiquidCrystal_I2C::LiquidCrystal_I2C( uint8_t lcd_Addr )
 {
-  _Addr = lcd_Addr;
-
-  _backlightval = LCD_NOBACKLIGHT;
+   _Addr = lcd_Addr;
+   
+   _backlightval = LCD_NOBACKLIGHT;
 }
 
 
 		_displayfunction |= LCD_2LINE;
 	}
 	_numlines = lines;
-
+   
 	// for some 1 line displays you can select a 10 pixel high font
 	if ((dotsize != 0) && (lines == 1)) {
 		_displayfunction |= LCD_5x10DOTS;
 	}
-
+   
 	// SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
 	// according to datasheet, we need at least 40ms after power rises above 2.7V
 	// before sending commands. Arduino can turn on way before 4.5V so we'll wait 50
 	delayMicroseconds(50000); 
-  
+   
 	// Now we pull both RS and R/W low to begin commands
 	expanderWrite(_backlightval);	// reset expander and turn backlight off (Bit 8 =1)
 	delay(1000);
-
+   
   	//put the LCD into 4 bit mode
 	// this is according to the hitachi HD44780 datasheet
 	// figure 24, pg 46
 	
 	// finally, set to 4-bit interface
 	write4bits(0x02); 
-
-
+   
+   
 	// set # lines, font size, etc.
 	command(LCD_FUNCTIONSET | _displayfunction);  
 	
 	command(LCD_ENTRYMODESET | _displaymode);
 	
 	home();
-  
+   
 }
 
 
    {
       mode = Rs;
    }
-
+   
 	uint8_t highnib=value>>4;
 	uint8_t lownib=value & 0x0F;
    
 
 
 
-	

LiquidCrystal_I2C.h

 #ifndef LiquidCrystal_I2C_h
 #define LiquidCrystal_I2C_h
 #include <inttypes.h>
-#include <Print.h>
+#include <Print.h>HD44780
 #include <Wire.h>
 #include <I2CIO.h>
-#include <LiquidCrystal.h>
+#include <LCD.h>
 
 // flags for backlight control
 #define LCD_BACKLIGHT   0x00
 #define LCD_NOBACKLIGHT 0x80
 
 /*!
-   @warning These definitions will have to be changed should the IOExpander be 
-   connected differently to this default.
-*/
+ @warning These definitions will have to be changed should the IOExpander be 
+ connected differently to this default.
+ */
 
 /*!
-    @defined 
-    @abstract   Enable bit of the LCD
-    @discussion Defines the IO of the expander connected to the LCD Enable
-*/
+ @defined 
+ @abstract   Enable bit of the LCD
+ @discussion Defines the IO of the expander connected to the LCD Enable
+ */
 #define En B01000000  // Enable bit
 
 /*!
 #define Rs B00010000  // Register select bit
 
 
-class LiquidCrystal_I2C : public LiquidCrystal 
+class LiquidCrystal_I2C : public LCD 
 {
 public:
    
     @param      none
     */
    void noBacklight();
-
+   
    /*!
     @function
     @abstract   Switch-on the LCD backlight.
     @param      none
     */
    void backlight();
-
-
+   
+   
 private:
    
    /*!

examples/HelloWorld_4bit/HelloWorld_4bit.ino

 #include <Wire.h>
 #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
+###########################################
+# Syntax Coloring Map For LiquidCrystal_I2C
+###########################################
+
+###########################################
+# Datatypes (KEYWORD1)
+###########################################
+
+LiquidCrystal_I2C    KEYWORD1
+LiquidCrystal        KEYWORD1
+LCD                  KEYWORD1
+
+###########################################
+# Methods and Functions (KEYWORD2)
+###########################################
+init                 KEYWORD2
+begin                KEYWORD2
+clear                KEYWORD2
+home                 KEYWORD2
+noDisplay            KEYWORD2
+display              KEYWORD2
+noBlink              KEYWORD2
+blink                KEYWORD2
+noCursor             KEYWORD2
+cursor               KEYWORD2
+scrollDisplayLeft    KEYWORD2
+scrollDisplayRight	KEYWORD2
+leftToRight          KEYWORD2
+rightToLeft          KEYWORD2
+autoscroll           KEYWORD2
+noAutoscroll         KEYWORD2
+createChar           KEYWORD2
+setCursor            KEYWORD2
+print                KEYWORD2
+write                KEYWORD2
+println              KEYWORD2
+###########################################
+# Constants (LITERAL1)
+###########################################
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.