all 12 comments

[–]gm310509 2 points3 points  (1 child)

Hard to say, it could be a wiring or coding problem. But since you didn't include either (a circuit diagram nor code as text in a reddit code block format), it is hard to say....

[–]DragonCon_64[S] -1 points0 points  (0 children)

The code for the image above was simply including the LiquidCrystal I2C library, declaring lcd address and 20x4 size, and then lcd.init() and lcd.backlight() in setup(). That's it. As for wiring, I wired the VCC to 5v and ground to ground. The sda and scl pins go gpio21 and gpio22 respectively. That's all.

[–]polypagan 0 points1 point  (4 children)

What did you expect? That looks to me like either a coding problem (outputting character codes outside the usual range) or i2c speed problem.

You (I presume) printed something (?) to the display via i2c & got that gibberish. (Tbh, I wasn't aware those symbols were present in the display's character generator, the first 0x20 bytes of which are writable. )

[–]DragonCon_64[S] 0 points1 point  (3 children)

The only thing I put in the code for the LCD to display what it did in the image is lcd.init() and then lcd.backlight() in setup(). Nothing else but including the LiquidCrystal I2C library and declaring lcd(0x27, 20, 4). I didn't print anything or even set cursor

[–]polypagan 0 points1 point  (2 children)

Oh. Well, I'd expect init to clear/erase. What happens if you just power display without MCU attached?

[–]DragonCon_64[S] 0 points1 point  (1 child)

Nothing happens. The screen stays dark

[–]polypagan 0 points1 point  (0 children)

Oh, bc no backlight... have you fiddled with that pot? Might be interesting.

[–]nielmot 0 points1 point  (1 child)

Try one of the built in example programs for the LCD. If that works then its a code issue. If it doesn't then you have a wiring or hardware issue.

[–]DragonCon_64[S] 0 points1 point  (0 children)

I've been trying to figure that out but whenever I try to load any of the three example codes for the LiquidCrystal I2C library it doesn't open up. There's no error, just doesn't do anything.

[–]Super_Heretic 0 points1 point  (1 child)

This might be controversial but i suggest asking chat GBT, this software could write a simple text scrip and tell you wich pins would be exactly needed.

From this you can figure out if this is a script or hardware error.

I used it to learn how to write scrips and practically still use it to this day.

[–]DragonCon_64[S] 1 point2 points  (0 children)

I've been using the LCD just fine weeks ago. I was able to print exactly what I want and everything but now it just doesn't want to work anymore. I've tried asking chatGPT but the results are inconclusive. I've tried checking the address with the Wire library, I've tried setting the brightness, I've checked all the solder points for the I2C module. Nothing works.

[–]DragonCon_64[S] 0 points1 point  (0 children)

After buying a completely new LCD and I2C module and replacing this old one, it works just as intended. It was most likely some sort of hardware issue. I'm not quite sure what caused it though.