Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with begin(20,4) for 20 by 4 display #15

Open
fletchjp opened this issue Jan 20, 2024 · 3 comments
Open

Problem with begin(20,4) for 20 by 4 display #15

fletchjp opened this issue Jan 20, 2024 · 3 comments

Comments

@fletchjp
Copy link

I have some code which I have been running using LiquidCrystalIO with a 20 by 4 LCD display. I have not used it for some time and when I recompile the display no longer works - it goes black and resets the LCD in some way.

I have experimented with the code and examples work e.g. your HelloI2C as long as I use begin(16,2).

Code using a direct call to hd44780_I2Cexp to set up the LCD works fine with begin(20,4).

I am using an Arduino MEGA and a display with I2C 0x27 and using LiquidCrystalI2C_RS_EN.

I have had a look at the library code and cannot spot anything obvious in the code changes.

John Fletcher

@fletchjp
Copy link
Author

I am using version 1.4.3 of LiquidCrystalIO as released through the Arduino Library management system, along with other libraries of the family.

@fletchjp
Copy link
Author

I have found the answer to my problem. I was missing this code, which is in your example helloI2c

// most backpacks have the backlight on pin 3.
lcd.configureBacklightPin(3);
lcd.backlight();

When I put that into my example it all works again. Cheers John

@fletchjp
Copy link
Author

I think that the configureBacklightPin code used to be in a constructor. That explains why my code used to work....
John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant