Hi let me relate a little background first since it may help others who are struggling with this device.
I had one HD44780 LCD with I2C backpack. For those unsure the backpack is a device that allows you to use serial communication so only requiring 2 data pins on your Arduino board.
Here is a picture of the board
I quickly realised that the built-in LCD library could not communicate with an I2C equipped LCD.
I am quite new to Arduino so I do not understand external libraries very well and was unsure which ones to try. I found a blog that seemed to say that the Adafruit library was the best for communicating with these devices. I tried it and got nothing on the screen despite twiddling the contrast pot. So I put a scope on the relevant pins from the Arduino and confirmed there was a signal being sent. I started to suspect my board was defective so I bought another one but no luck with this either!
Eventually I found HELP! I2C LCD 16x2 display not working! - Project Guidance - Arduino Forum
So I downloaded the "Extensible HD44780 LCD library" and ran the example test sketch I2Cexpdiag
To my delight both LCDs gave output.
The only remaining problem is that one of them has very low contrast and the other is normal.
Here are images of them
Good one
Bad one
I don't think the low contrast one is physically deficient because by briefly interrupting it's power supply I can get it to display some sort of error output and this is in normal contrast.
Note these images are created after adjusting the pots for maximum contrast. The bad one is at the end of its range but as you can see, with the error signal output the contrast is good.
So, as I said I am not very competent with libraries, so I would like to ask whether there is some more I can do with Bill Perry's library to adjust the contrast of the bad one.
Here are the outputs from I2Cexpdiag
If you can't read that easily use this link output
It seems to me that the outputs indicate that all is OK, but that the LCD is connected to different memory locations for the I2C namely the good one at 0x27 and the bad one at 0x3F. I understand that the clever library takes care of these differences, so I guess this is not the issue.
Thanks in anticipation of your assistance
Mike Avison