New LiquidCrystal library  1.3.5
Generic LCD control library
/Users/fmalpartida/Documents/development/mercurial repos/SW/NewliquidCrystal/LiquidCrystal_I2C_ByVac.h
1 // ---------------------------------------------------------------------------
2 // Created by GHPS on 5/06/2012.
3 // Copyright 2012 - Under creative commons license 3.0:
4 // Attribution-ShareAlike CC BY-SA
5 //
6 // This software is furnished "as is", without technical support, and with no
7 // warranty, express or implied, as to its usefulness for any purpose.
8 //
9 // Thread Safe: No
10 // Extendable: Yes
11 //
12 // @file LiquidCrystal_I2C_ByVac.c
13 // This file implements a basic liquid crystal library that comes as standard
14 // in the Arduino SDK but using the extension board BV4218/BV4208 from ByVac.
15 //
16 // @brief
17 // This is a basic implementation of the LiquidCrystal library of the
18 // Arduino SDK. The original library has been reworked in such a way that
19 // this class implements the all methods to command an LCD based
20 // on the Hitachi HD44780 and compatible chipsets using I2C extension
21 // backpack BV4218 from ByVac.
22 //
23 // The functionality provided by this class and its base class is identical
24 // to the original functionality of the Arduino LiquidCrystal library.
25 //
26 // @author GHPS - ghps-et-users-sourceforge-net
27 // ---------------------------------------------------------------------------
28 #ifndef LiquidCrystal_I2C_ByVac_h
29 #define LiquidCrystal_I2C_ByVac_h
30 #include <inttypes.h>
31 #include <Print.h>
32 
33 #if defined(__AVR_ATtiny84__) || (__AVR_ATtiny2313__) || defined (__AVR_ATtiny85__)
34 
35 #include "TinyWireM.h" // include this if ATtiny84 or ATtiny85 or ATtiny2313
36 
37 #define Wire TinyWireM
38 
39 #else
40 
41 #if (ARDUINO < 10000)
42  #include <../Wire/Wire.h>
43 #else
44  #include <Wire.h>
45 #endif
46 
47 #endif
48 
49 #include "LCD.h"
50 
51 
53 {
54 public:
55 
65  LiquidCrystal_I2C_ByVac (uint8_t lcd_Addr);
66 
83  virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
84 
97  virtual void send(uint8_t value, uint8_t mode);
98 
99 
107  void setBacklight ( uint8_t value );
108 
117  void setContrast ( uint8_t value );
118 
119 private:
120 
126  int init();
127 
137  uint8_t _Addr; // I2C Address of the IO expander
138 
139 };
140 
141 #endif
virtual void send(uint8_t value, uint8_t mode)
Definition: LiquidCrystal_I2C_ByVac.cpp:99
Definition: LiquidCrystal_I2C_ByVac.h:52
Definition: LCD.h:187
virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)
Definition: LiquidCrystal_I2C_ByVac.cpp:49
void setBacklight(uint8_t value)
Definition: LiquidCrystal_I2C_ByVac.cpp:60
void setContrast(uint8_t value)
Definition: LiquidCrystal_I2C_ByVac.cpp:71
LiquidCrystal_I2C_ByVac(uint8_t lcd_Addr)
Definition: LiquidCrystal_I2C_ByVac.cpp:38