0

I'm a newbie in engineering.

I bought this with arduino learning kit.

It's simply not working.

There are several possible problems:

  • The display is not working due to a hardware problem. It could need to be repaired or soldered better.
  • The library that I chose could be buggy (software problem)

How can I check this? Thanks!

PS Build-in led is blinking as expected.

Here is the code:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()
{
  lcd.init();
  lcd.begin(8,2);

  pinMode(LED_BUILTIN, OUTPUT);
}


void loop()
{
  digitalWrite(LED_BUILTIN, HIGH);
  lcd.setCursor(0, 0);
  lcd.print("TEST");
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  lcd.setCursor(0, 0);
  lcd.print("   ");
  delay(1000);
}

enter image description hereenter image description here

3
  • Do you have pull up resistors from sda and scl to your vdd? – justing Jun 12 '17 at 16:07
  • 1
    Did you run scanner program first to verify the address of the I2C? you'll find the software at the bottom of this page arduino-info.wikispaces.com/LCD-Blue-I2C – JIm Dearden Jun 12 '17 at 16:18
  • Scanner is definitely best approach, but if 0x27 address is wrong, try 0x35 as a quick test. Unless you have soldered jumpers, these are the two most likely addresses. Your wiring looks correct. – KC Tucker Jun 12 '17 at 17:24
0

Try with this address 0x3F or 0x27

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // or 0x27
void setup() {
lcd.begin(16, 2);
}
void loop()
{
  digitalWrite(LED_BUILTIN, HIGH);
  lcd.setCursor(0, 0);
  lcd.print("TEST");
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  lcd.setCursor(0, 0);
  lcd.print("   ");
  delay(1000);
}
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.