I have just received my 20x4 I2C lcd displays and trying to get some example codes to work but having problems when compiling the examples.
I have downloaded some examples to try my displays but they will not compile for various reasons. A couple have the #include <LCD.h> and i get error message :-
Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Uno"
In file included from C:\Users\Tony\Google Drive\Arduino\lcd_i2c_test\i2c_test_3\i2c_test_3.ino:2:0:
C:\Program Files (x86)\Arduino\libraries\LCD/LCD.h:21:60: fatal error: lcd_config.h: No such file or directory
#include "lcd_config.h" // pin and power configuration file
^
compilation terminated.
exit status 1
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Do i have something wrong in my library file ?
any help would be appreciated.
The code i am trying to run is;-
[code]
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h> // F Malpartida's NewLiquidCrystal library
#define I2C_ADDR 0x20 // Define I2C Address for controller
#define BACKLIGHT_PIN 7
#define En_pin 4
#define Rw_pin 5
#define Rs_pin 6
#define D4_pin 0
#define D5_pin 1
#define D6_pin 2
#define D7_pin 3
#define LED_OFF 0
#define LED_ON 1
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
void setup()
{
lcd.begin (16,2); // initialize the lcd
// Switch on the backlight
lcd.setBacklightPin(BACKLIGHT_PIN,NEGATIVE);
lcd.setBacklight(LED_ON);
}
void loop()
{
// Reset the display
lcd.clear();
delay(1000);
lcd.home();
// Print on the LCD
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("Hello, world!");
delay(8000);
}
[/code]