I have a DX LCD1602 Adapter Board w/I2C Interface backpack and standard green Hitachi 16x2 LCD. The back-light fires up and i get the black squares but that is it. To make sure I am outputting data, i am printing "hello world" to the serial monitor as well and it is ok.
I2C backpack: http://www.dx.com/p/lcd1602-adapter-board-w-iic-i2c-interface-black-works-with-official-arduino-boards-216865#reviews
Wiring:
CLK is A4
DAT is A5
The data from DX website shows Device address: 0x27 but i2c_scanner (Arduino Playground - I2cScanner) scanner shows address is 0x3F.
Any further troubleshooting techniques i can use to find our why she is not responding? I must have an addressing problem. The back light (always on) is supposed to toggle on and off.
Code:
#include <Adafruit_LiquidCrystal.h>
/*
Demonstration sketch for Adafruit i2c/SPI LCD backpack
using MCP23008 I2C expander
( http://www.ladyada.net/products/i2cspilcdbackpack/index.html )
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
5V to Arduino 5V pin
GND to Arduino GND pin
CLK to Analog #5
DAT to Analog #4
*/
// include the library code:
#include "Wire.h"
#include <Adafruit_LiquidCrystal.h>
// Connect via i2c, default address #0 (A0-A2 not jumpered)
Adafruit_LiquidCrystal lcd(0);
void setup() {
lcd.setBacklight(LOW);
lcd.begin(16, 2);
lcd.print("hello, world!");
Serial.begin(9600);
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
Serial.print ("hello, world!");
lcd.setBacklight(HIGH);
delay(500);
lcd.setBacklight(LOW);
delay(500);
}