adwsystems:
Looks like we are going to have to make a side trip and discuss installing the library.
https://www.arduino.cc/en/guide/libraries gives three methods:
- Manage Libraries
- Import a .ZIP library
- Manual Installation
(1) Doesn't work...the fmalpartida library is not listed.
It doesn't have support for it. but given the way the library combines multiple libraries and needs to replace the supplied LiquidCrystal library it is unlikely it could be supported by the library manager in its current form.
And even if the files could be massaged to make it work, I doubt that team Arduino would add support for it to the library manager since it replaces their library as I'm sure they would rather it be separate/different library with a different name.
(2) Doesn't work...the .zip file is not recognized as a .zip library file by the IDE
i thought it used to work. But I don't install it that way. I either do it manually or git clone it directly into my sketchbook libraries directory so that I can track all my changes with git.
(actually I'm not using it much anymore since I'm using my hd44780 i2c library)
That leaves only (3). The instructions say to install it in the sketch->library folder. That is what I have been doing. Bill mentioned it should replace the LiquidCrystal library included from the IDE install. Having no instructions, I assume the method is to shutdown the IDE, navigate to the arduino program directory, delete the old and install the new? Hope that's right because it is what I did.
You can place it either in your sketchbook/libraries directory or replace the system supplied LiquidCrystal library. Either will work. The important thing is that to avoid any IDE build issues the library directory needs to be named "LiquidCrystal" and the orignal LiquidCrystal library directory must be removed or move away to some other place.
As for the I2C LCD Guesser. It finds the PCF8574 at address 0x27. But I only see one blink of the backlight per 'send' click and garbage characters on an unlit screens. It does not appear to try all combinations. Only six combinations are attempted, the most popular ones?
Yes it only tries 6 permutations of the wiring. (All the wirings, I've seen after looking any MANY different backpacks)
Nearly all the bapacks are using 1 of 2 wirings. There are 2 other wirings that I've seen used but they are less popular and one of those I've only seen used on fm's ElectoFun board.
As it guesses, it is unpredictable what the lcd or backlight will do with incorrect guesses.
When it is correct, you will see the constructor on the LCD and the backlight will remain on.
I'm curious as to why it is not working with your backpack.
It could be that there is an issue with the sketch or you have a wiring that I've not seen before.
From looking at the blurry photo of the backpack you posted in post #28, it appears that:
PCF8574 P5 connects to hd44780 D5
PCF8574 P6 connects to hd44780 D6
PCF8574 P7 connects to hd44780 D7
PCF8574 P2 connects to hd44780 E
And it kind of looks like (but it is very hard to tell with the blurry photo)
PCF8574 P1 connects to hd44780 R/W
While I can't see the other traces well enough to see where they go, that wiring
matches with the first two guesses which are the two most common wirings for these types of backpacks.
The only difference between those two most common wirings is the backlight control polarity.
The best thing is to simply look at the board. A good visual check can verify the board wiring in just a minute or so.
If you can't see all the traces because it is soldered then use a ohm meter to resolve the wiring you can't see.
These 3 wirings are the most common and have account for all the boards I've ever seen other than fm's ElectroFun board:
// EN, RW, RS, D4, D5, D6, D7, BL, POL
{ 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE }, // YwRobot/DFRobot/SainSmart
{ 2, 1, 0, 4, 5, 6, 7, 3, NEGATIVE }, // Robot Arduino LCM1602/2004
{ 4, 5, 6, 0, 1, 2, 3, 7, NEGATIVE }, // MJKDZ board
However, I really want to know why it is not working on your board.
There have only been 3 other cases where it wasn't working for people and in each of those 3 times, the person disappeared without resolving the "problem" and I never heard back from them.
So I have no idea if there is really an issue or whether they finally got it working an just didn't want to come back and report their final solution.
In a couple of cases there were serial issues on the mac which caused the guesser to lock up.
That is not to say the guesser doesn't have an issue, it is just that so far, I've not been able to confirm a case where the guesser didn't work.
--- bill