I've been trying to get a LCD I bought from deal extreme to work for some time with my ATTiny85 chip. It should be capable. I've tried googling the device but there is no proper documentation, so I figured the best way to get the address is to scan for it. How ever, the code below does not work :( any pointers? Anyone else who has gotten this I2C LCD display to work with Arduino?
As I have no other output then the screen, the thought behind the code is to scan for devices and then when it finds one (the LCD is the only one connected to the bus) should then print the address :)
I only have a serial programmer and attiny85 chips, so I have no way to bring it to a full Arduino UNO or whatever for further debugging.
#include <TinyWireM.h>
#include <LiquidCrystal_I2C.h>
void setup()
{
TinyWireM.begin();
}
void loop()
{
byte error, address;
for(address = 1; address < 127; address++ )
{
TinyWireM.beginTransmission(address);
error = TinyWireM.endTransmission();
if (error == 0) break;
delay(5000);
}
LiquidCrystal_I2C lcd(address, 16, 2);
lcd.init();
lcd.backlight();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Hello World - " + address);
}