Hi All I bought this LCD
http://www.ebay.com/itm/281141014288?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
I am using a Sainsmart Mega 2560
I have found the i2c scanner and verified that it responds on i2c address 0x27. (confirms no stupid wire error)
I have tried LCD library that was linked via wiki via the ebay listing as well as the one referenced in the code snippet
I get no chars on display or no backlight. It acts 100% dead except for the i2c scanner which does detect it.
All I can think of is the magic numbers for the LCD connections are wrong.
Any ideas??
Also I was unsure if the Ardunio could power this off usb or not so I added a wall pwr supply that is rated 5 volt 1 amp, although to be honest I tested the 5v/ ground right at the LCD I2c board and saw 4.8 volts
1 more minor question. There is a shunt jumper on the i2c board labeled LED, any idea that is, I was guessing it was full backlight, and a POT could replace shunt for brightness control.
Here is a snippet of code
/* YourDuino.com Example Software Sketch
20 character 4 line I2C Display
Backpack Interface labelled "YwRobot Arduino LCM1602 IIC V1"
Connect Vcc and Ground, SDA to A4, SCL to A5 on Arduino
terry@yourduino.com */
/-----( Import needed libraries )-----/
#include <Wire.h> // Comes with Arduino IDE
// Get the LCD I2C Library here:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
// Move any other LCD libraries to another folder or delete them
// See Library "Docs" folder for possible commands etc.
//#include <LiquidCrystal_I2C.h>
#include <LiquidCrystal_I2C.h>
/-----( Declare Constants )-----/
/-----( Declare objects )-----/
// set the LCD address to 0x27 for a 20 chars 4 line display
// Set the pins on the I2C chip used for LCD connections:
// addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
/-----( Declare Variables )-----/
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
void setup() /----( SETUP: RUNS ONCE )----/
{
Serial.begin(38400); // Used to type in characters
lcd.begin(20,4); // initialize the lcd for 20 chars 4 lines, turn on backlight
// ------- Quick 3 blinks of backlight -------------
for(int i = 0; i< 3; i++)
{
lcd.backlight();
delay(150);
lcd.noBacklight();
delay(150);
}
lcd.backlight(); // finish with backlight on
//-------- Write characters on the display ------------------
// NOTE: Cursor Position: Lines and Characters start at 0
lcd.setCursor(3,0); //Start at character 4 on line 0
lcd.print("Hello, world!");
delay(100);
Serial.print("Ready ");
}
void loop()
{
}
