The IDE will find the header no matter what the directory name of the library is.
It looks in all of the to find the header file. And that is why you can't have two
libraries with the same library header file name since the IDE may find the library
header in a different library than the one you want.
In terms of using the constructor, it is used to initialize the library object
the parameters are specific to each library.
To see what they are and how to use them you must consult the documentation
for each library.
Below are constructor examples from two different libraries.
Each of these creates a library object called "lcd" for the library.
LiquidCrystal_I2C lcd(0x27, 20, 4);
LiquidCrystal_I2C lcd ( 0x3F,2,1,0, 4,5,6,7,3,POSITIVE);
Beyond the constructor, there are also initialization functions that must be called.
And those are also specific to the given library.
Here are typical examples of those functions:
You must first pick which library you want to use and for these two libraries only
one can be installed at a time.
Then use the proper constructor and initialization functions for that library.
With PCF8574 based backpacks, there is no "it just works" solution for all backpacks,
since there is no standardized way to wire up the PCF8574 chip i/o pins to a HD44780 LCD.
The two libraries that you have mentioned are different.
The LiquidCrystal_I2C library will only work on some backpacks since the pin wiring is hard coded.
fm's library since will work on any PCF8574 based backpack but you have to fill in the constructor
with the proper pin mapping for your board.
I prefer fm's library since it will work on any board. But you do have get the constructor
correct to get it to work.
My suggestion at this point, is to drop back to a simpler environment to
get the LCD working before you try toss m2tklib on top of it.
i.e. do some sort of "hello world" to ensure that the LCD is configured properly.
My recommendation is to use fm's library as it is fully compatible with the standard
What that means is that to change from using the 4 bit interface, all you have to do
is change the header file(s) you include, change the constructor, and it will "just work".
No changes to the actual sketch code will be needed.
If you go with the LiquidCrystal_I2C library and are luckily enough that it even works
with your backpack, you will have modify your sketch code to change the begin() call as well,
sinc the LiquidCrystal_I2C library requires using an init() function.