2

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);
}

I2C LCD: http://www.dx.com/p/iic-i2c-2-5-blue-screen-lcd-display-module-for-arduino-green-black-266170#.U6f_B_l_vIc

sachleen
7,5655 gold badges40 silver badges57 bronze badges
asked Jun 23, 2014 at 10:24
2
  • I'd double check your connections then. Is the module getting power? Are you using pull ups? Commented Jun 23, 2014 at 15:00
  • 4
    Why has this question been downvoted? I'm curious, because it seems a legitimate problem the user is having, he has shown research, and although it isn't an arduino chip he's using, he's obviously using the arduino library to compile the hex file. He didn't post the question to Arduino SE, it's been migrated here. I don't mind downvoted questions for crap questions, but when there is at least an honest attempt, why not post constructive comments as to how he could improve it. Commented Jun 29, 2014 at 9:39

1 Answer 1

1

I'm not sure on your program, but I bought a LCD display from Deal Extreme. I use the following address to communicate with the display:

LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27

It seems as that is the correct address for the LCD.

Anonymous Penguin
6,36510 gold badges34 silver badges62 bronze badges
answered Jun 27, 2014 at 18:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.