I2C lcd doesn't work properly [LCD broken]

Hi, I've been trying to use this lcd for quite a while, but everything I did doesn't work at all.
Of course i've tried the scanner code, both from the IDE and from online so there are no problems on the core nor the library themselves, but it deosn't work, it just gets stuck on "Scanning..." and doesn't even re-try after a while.
Still, here's the code and the photos of the connections and the monitor output.

#include <Wire.h>

void setup() {
  Wire.begin();

  Serial.begin(9600);
  while (!Serial); // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");
}

void loop() {
  int nDevices = 0;

  Serial.println("Scanning...");

  for (byte address = 1; address < 127; ++address) {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    byte error = Wire.endTransmission();

    if (error == 0) {
      Serial.print("I2C device found at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.print(address, HEX);
      Serial.println("  !");

      ++nDevices;
    } else if (error == 4) {
      Serial.print("Unknown error at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.println(address, HEX);
    }
  }
  if (nDevices == 0) {
    Serial.println("No I2C devices found\n");
  } else {
    Serial.println("done\n");
  }
  delay(5000); // Wait 5 seconds for next scan
} 



PS: I know it's not an original board, but it works exactly as an original one, plus it's the same IC.

What happens if you run the scanner with nothing connected to the Arduino ? Does the scan run and report no devices found ?

Hello alexmastang

Have made a cross check.

Scanning...
I2C device found at address 0x27  !
done

You have to check the wiring.

Yes, it does

I did check the wiring, it's all connected properly, as you can see in the pictures.
I didn't mention this, but i tried the exact same thing also on the anolog pins A5 and A4, same result.

Nevermind, I did check with another lcd, it's IDENTICAL and turns out the previous one is likely broken, the new one works flawlessly.


Anyway, thanks for the help!

1 Like

I am glad that you found the problem

A request :
Next time you need to post Serial monitor output, please select it from the Serial monitor and post it here in code tags rather than posting a blurry, oblique angle photo of the screen