fatal error : LCD.h : No such file or directory

Life was going happy with IDE version 1.6.5

Compiled and tested a large code saved it and then made the foolish decision to download and install IDE version 1.6.7

And since then the only message I see is the Fatal Error.

The Liquid Crystal library is very much there in C:\Users\RRNathan\Documents\Arduino\libraries
which also is the Sketch Book location in Preferences dialog box. And I can swear that I moved no file / folder when installing the version 1.6.7.

In fact I tried to add the library LiquidCrystal V1.2.1.zip it ( the smart IDE) promptly says Liquid Crystal library already exists.

I have enclosed the code upto Setup()

//=================== INCLUDE ====================

 // Include Libraries :
 #include "LCD.h"
 #include "LiquidCrystal_I2C.h"
 #include <SPI.h>
 #include "Wire.h"
 #include <phi_interfaces.h>
 #include <EEPROM.h>
 #include <SD.h> 

//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//================== DEFINES ======================
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

// Define the LCD pins to use and Initialize an instance
  LiquidCrystal_I2C  lcd(0x27,2,1,0,4,5,6,7); // 0x27 is the I2C bus address 
     
// Define the Machine Digital Inputs and Outputs
 #define StartPB 31                                         // Mega2560 mapping
 #define IncrPB 33
 #define DecrPB 35
 #define EnterPB 37
 #define total_buttons 4
 char mapDIN[]={'S','I','D','E'};                           // This is a list of names for each button.
 byte pinDIN[]={ StartPB,IncrPB,DecrPB,EnterPB};            // The digital pins connected to the 4 buttons.
 phi_button_groups MyDIN(mapDIN, pinDIN, total_buttons);
 multiple_button_input* pad1=&MyDIN;

 int BuzzerOut = 14;                                         // Output pin defines...
 int BTState   = 15;
 int FltLedOut = 16; 
 
// List all global variables....
 char LCDmsg[40];                                           // Mega2560
 unsigned int ScanMs = 50;
 char ValidDIN = '0';
 byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
 char tempchar[5]; 
 char Yr_Array[5];                                
 char Mo_Array[5];
 char Dt_Array[5];
 char Hr_Array[5];
 char Mi_Array[5];
 char CurLoc, NCurLoc;
 boolean RTC_Set_Gate = 0, RTC_Set_Gate01 = 1, RTC_Set_Gate02 = 0, HomeDisp_Gate = 1;
 
// Define Gate Flags to block segments by choice.
 boolean RTC_Disp_Gate = HIGH;
 
 

//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//================= SETUP ========================= 
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
 void setup() 
 {
// START SERIAL FOR DEBUGGING
  Serial.begin(9600);
// Usage : Serial.println(variable);  

// START THE I2C INTERFACE
  #define DS3231_I2C_ADDRESS 0x68             // 0x68 is the RTC address
  Wire.begin();
  Wire.beginTransmission(DS3231_I2C_ADDRESS);
  Wire.write(0xE);                            // Address the Control Register
  Wire.write(0x00);                           // Write 0x0 to control Register
  Wire.endTransmission();
  Wire.beginTransmission(DS3231_I2C_ADDRESS);
  Wire.write(0xF);                            // Address the Status register
  Wire.write(0x00);                           // Write 0x0 to Status Register
  Wire.endTransmission(); 

// START THE LCD INTERFACE

  lcd.begin(20,4);                          
  lcd.setBacklightPin(3,POSITIVE);
  lcd.setBacklight(HIGH);
  lcd.clear();
  lcd.write( "VAP LUBE MANAGEMENT."); 
  lcd.setCursor(0,1);
  lcd.write( "   Version : 1.00   ");
  lcd.setCursor(0,2);
  lcd.write( "%%%%%%%%%%%%%%%%%%%%");
  lcd.setCursor(0,3);
  lcd.write( "$$$$$$$$$$");
  delay (2000);

// SETUP THE OUTPUT PIN
  pinMode(BuzzerOut, OUTPUT);
  pinMode(BTState, OUTPUT);
  pinMode(FltLedOut, OUTPUT);

 //setDS3231time(00, 32, 12, 7, 13, 12, 15); // For setting RTC (Sec,Min,Hr,Day,Month,Year)
  
 }

I will be happy to be able to use my checked and verified code ... kindly help.

#include "LCD.h"
#include "LiquidCrystal_I2C.h"

This form of #include usually indicates that the library files are located in the same folder as the program.

As an experiment try

 #include <LCD.h>
 #include <LiquidCrystal_I2C.h>

which will cause the preprocessor to look in the libraries folder.

Oh ... looks like the code which I modified as part of trials got posted. Sorry.

Originally it was like as you mentioned only. And yet it threw the same Fatal Error. I guess my woes are more complex than it appears ...

thanks for the suggestion

And one more odd thing...

When I click Examples in the File menu and choose Liquid Crystal and try to compile any of the examples there, I get the same Fatal error. How is this happening ??

Is there a chance that you haven't thrown away the previous version of the IDE? I always keep the last one around, in case the new one has an incompatibility with something in an old batch of code. Once or twice, that sort of thing occurred. Maybe you can find the older version to download.

Fortunately I have and have installed it also. But with no luck.

It's now gradually coming to a situation that the I2C version of Liquid Crystal is the offending fellow. I am saying this because it shows all its examples in the drop down menu but not one of them compile. They all say LCD.h is not there. Stupid. >:(

Mogaraghu:
Fortunately I have and have installed it also. But with no luck.

Does this mean that you have two versions installed?

If not, did you clean up properly after uninstalling the previous version?

(I'm using v1.6.5, and use the "LiquidCrystal_I2C" library a fair bit, so won't update right now. :slight_smile: )

You shouldn't need to explicitly include "LCD.h", either. It's automatically included in the "LiquidCrystal_I2C.h" file.
(That won't help solve your problem unfortunately.)

Did you delete the original "LiquidCrystal" library from your fresh IDE install? It can't co-exist with the I2C version, from memory.

Yes looks like I am heading for a fresh install. I also used the I2C version of Liquid Crystal library quite a bit with no issues.
Does the IDE or libraries create any Registry entries or it's enough to just delete the relevant folders and the Preference. Txt file before installing fresh ??

Mogaraghu:
Yes looks like I am heading for a fresh install. I also used the I2C version of Liquid Crystal library quite a bit with no issues.
Does the IDE or libraries create any Registry entries or it's enough to just delete the relevant folders and the Preference. Txt file before installing fresh ??

Use "uninstall" to be sure, rather than simply deleting. There are definitely registry entries associated with Arduino.
I've also heard that there's an "Arduino15" folder in "Application Data" that might need to be deleted.

I've personally never upgraded or uninstalled, so hopefully someone with first-hand experience can help more.
(I've done too much customising to do a simple upgrade. I'd have to be very careful.)

Ok life looks better again.

Cleaned up all traces of the previous install and installed the Version 1.6.7 and built the libraries fresh. Its back to normal and my code compiles fine.

Thanks to all who gave suggestions. Really helped.

Excellent. Glad to hear it. :slight_smile:

Hi! Im having this same problems but in the web editor. any ideas?