I am trying to verify/compile an INO file. The INO calls LiquidCrystal_I2C.h which the author of the code said was native to the IDE. I am running 1.8.9 on a Windows 7 desktop. I went out and found several places that had that header file and tried placing them in the sketch directory, in
C:\Users\Living Room\Documents\Arduino\libraries\LiquidCrystal_I2C
and in
C:\Arduino1.8.7\hardware\arduino\avr\libraries\LiquidCrystal_I2C
but every time I try to verify the file I get an error:
LiquidCrystal_I2C.h: No such file or directory
I tried using several different copies that I found on the web including here but none were recognized.
Can someone point me to what I am missing or tell me how to convince the IDE that the file is right where it is looking?
Last week I had trouble with the IDE recognizing some STM32 libraries and was told how to fix that but the IDE is apparently still having issues.
TomGeorge:
Are you using the IDE to install the library zip files?
Or are you manually unzipping and copying?
I am manually unzipping the files, creating the directory in the Libraries directory and copying them into that directory.
What I do not understand is if that library is supposed to be part of the base IDE install then why do I need to find another one and even if it is part of the IDE or a separate 3rd party one why doesn't the IDE see it?
TomGeorge:
What model Arduino are you using?
Nano but the INO is specifically to program a ATMega328P bare chip so the Nano is nothing more than the programmer in this case.
Robin2:
Please post the program that causes the problem and also post the actual error message.
Also post a link to the author's advice about the location of the library.
...R
This is only the start of the INO but is also where it quits:
// LM: Modifications to: released_code_V2.0.ino
// LCD ( J6) and selected CAT commands ( J5)
// LCD is always enabled.
Using library Etherkit_Si5351-2.0.1 at version 2.0.1 in folder: C:\Users\Living Room\Documents\Arduino\libraries\Etherkit_Si5351-2.0.1
Using library Wire at version 1.0 in folder: C:\Arduino1.8.7\hardware\arduino\avr\libraries\Wire
Using library EEPROM at version 2.0 in folder: C:\Arduino1.8.7\hardware\arduino\avr\libraries\EEPROM
exit status 1
LiquidCrystal_I2C.h: No such file or directory
Southerner:
I am manually unzipping the files, creating the directory in the Libraries directory and copying them into that directory.
You must have done it wrong, otherwise you would not get that error. Please post a link to where you downloaded the library from and I'll give you detailed installation instructions.
Southerner:
What I do not understand is if that library is supposed to be part of the base IDE install then why do I need to find another one and even if it is part of the IDE or a separate 3rd party one why doesn't the IDE see it?
Because either you misunderstood or the author of the code is wrong. The base IDE installation has never come with a library that contains a file named LiquidCrystal_I2C.h. It does come with the LiquidCrystal library, but that is for when you're using the non-I2C LCDs so it can't serve as an alternative to the library that contains LiquidCrystal_I2C.h.
What I do not understand is if that library is supposed to be part of the base IDE install then why do I need to find another one and even if it is part of the IDE or a separate 3rd party one why doesn't the IDE see it?
LiquidCrystal.h is a base Arduino library, but not LiquidCrystal_I2C.h.
I would delete what you have previously installed, and then use the library manager of the IDE to install the library. It will go to the libraries folder with the sketches.
cattledog:
I would delete what you have previously installed, and then use the library manager of the IDE to install the library. It will go to the libraries folder with the sketches.
Although generally I think that's excellent advice, in this case it might be a bad idea. The reason is that there are several libraries either called LiquidCrystal_I2C, or that contain a file named LiquidCrystal_I2C.h. These libraries have different APIs and it's not guaranteed that the one that happens to be found in Library Manager is the one the code was written to work with. So if the author of the code has recommended a specific LiquidCrystal_I2C library then I would recommend making sure you install that exact library. If that library happens to be in Library Manager then certainly use that installation method.
There is a second layer to this problem, and even if @Southerner gets the correct library, there is no guarantee that it will work with his I2C lcd display. There may be a different i2c address, and the i2c backpack to lcd pin mapping may not be the default setting of the library.
For these reasons the current best advice on i2c library confusion is to download Bill Perry's hd44780 library available through the library manager.
This library will auto detect the I2C address and the I2C backpack to LCD pin mapping. For the backpack displays, you want to use the hd44780_I2Cexp class.
#include <Wire.h>
#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h> // include i/o class header
hd44780_I2Cexp lcd;
There is a diagnostic sketch to run if there are any issues.
Extensive documentation is here
I don't believe that there has ever been an issue with an api from a different i2c lcd library not being supported by hd44780.h, although if there is a call for init() rather than begin(cols, rows) a change will need to be made.
Bill Perry is an active participant in the Display forum and if there are complex issues which can not be solved by others, he will get involved.
Southerner:
I am manually unzipping the files, creating the directory in the Libraries directory and copying them into that directory.
Well use the IDE to unzip and place the library where it is suppose to go.
It will then also load any examples that the library may have.
Select "Sketch" ,"Include Library", "Add ZIP Library", then using the opened window, find your zip file and let the IDE open it.
The library should then appear in the "Include Library" as well as the Examples folder in the IDE.
Tom...
I believe that if you manually install the library from a zip file, that you must exit and restart the IDE in order for the IDE to "see" the new library.
But, IMO, it is better to use libraries that are known by the IDE library manager and have the IDE install it without messing with zip files. Typically newer and better maintained libraries will be known by the IDE library manager.
bperrybap:
I believe that if you manually install the library from a zip file, that you must exit and restart the IDE in order for the IDE to "see" the new library.
That was how it was with Arduino IDE 1.6.5 and older. With the modern IDE versions (and we know southerner is using 1.8.9), manual installation without restarting the IDE will not cause the "No such file or directory" error.
It is still necessary to restart the IDE before the manually installed library's examples will show up in the File > Examples menu or for the library to show in the Sketch > Include Library menu.
You know what, I had this very problem a couple of days ago. Could not get it to work at all. My IDE was unused for some time and was an older version, so I saved all my old sketches and uninstalled and reinstalled IDE.
I also used LiquidCrystal_PCF8574.h instead now and it works well for me.
krbruner:
You know what, I had this very problem a couple of days ago. Could not get it to work at all. My IDE was unused for some time and was an older version, so I saved all my old sketches and uninstalled and reinstalled IDE.
I also used LiquidCrystal_PCF8574.h instead now and it works well for me.
If you store your projects in a folder independent of the IDE folder, you do not have to save them;
This is a screenshot of my preferences page.
The IDE will also put the library directory in it as well, so when you do an update, you do not loose any projects or already downloaded and installed libraries.
Tom...