C:\Users\paul\AppData\Local\Temp\.arduinoIDE-unsaved2026427-21980-hexn6a.99onr\sketch_may27b\sketch_may27b.ino:1:10: fatal error: LiquidCrystal_I2C.h:

can you please help me? ive been trying to upload the code i find online and i followed all the things the creator said but until now, it always says that there is no such file or directory even tho i uploaded the provided library. what should i do?

C:\Users\paul\AppData\Local\Temp.arduinoIDE-unsaved2026427-21980-hexn6a.99onr\sketch_may27b\sketch_may27b.ino:1:10: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include "LiquidCrystal_I2C.h"
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: LiquidCrystal_I2C.h: No such file or directory

The error is saying the IDE can not find a LiquidCrystal library in your IDE libraries path... try this...

IDE >> SKETCH >> INCLUDE LIBRARY >> MANAGE LIBRARIES

Then in the "filter your search" field, type "LiquidCrystal_I2C"

You should see the first selection by Martin Kubovic... click "INSTALL"

Then try compiling your code again.

(post deleted by author)

Since we have no idea who "the creator" was or what they said or for that matter what you actually did do, what do you expect anyone here to be able to tell you?

Duplicate topic with same subject. C:\Users\paul\AppData\Local\Temp\.arduinoIDE-unsaved2026427-21980-hexn6a.99onr\sketch_may27b\sketch_may27b.ino:1:10: fatal error: LiquidCrystal_I2C.h:

@jjey1593 ,

Your two or more topics on the same or similar subject have been merged.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

i am making an automatic irrigation system that i found in youtube, this is the link of the youtube video https://youtu.be/7KdhL_gAqHQ?si=CaJvIeVH5r_ZNKiS . I followed everything that he says with the coding, i copied the code then paste it in arduino ide. i downloaded also the zip file of liquidcrystal i2c and its scanner but when it is time to upload and compile it. it always says no such file or directory, even tho i added the liquidcrystal i2c in include library and follow the instruction of the creator. the only different that i do in manage libraries is instead of liquidcrystal i2c by marco schwartz i use the liquidcrystal i2c by marc paratte, since i cant seems to find the one that is made by marco schwartz. how to fix this?

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\paul\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.8
Using core 'arduino' from platform in folder: C:\Users\paul\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.8

Detecting libraries used...
C:\Users\paul\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\paul\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.8\cores\arduino -IC:\Users\paul\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.8\variants\standard C:\Users\paul\AppData\Local\arduino\sketches\D8874EDE8F9AEA6ADFD23B74DF09A4DA\sketch\sketch_may27b.ino.cpp.merged -o nul -MMD -MF C:\Users\paul\AppData\Local\arduino\sketches\D8874EDE8F9AEA6ADFD23B74DF09A4DA\sketch\sketch_may27b.ino.cpp.merged.libsdetect.d
Alternatives for LiquidCrystal_I2C.h: [LiquidCrystal_I2C@1.1.4]
ResolveLibrary(LiquidCrystal_I2C.h)
  -> candidates: [LiquidCrystal_I2C@1.1.4]
C:\Users\paul\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\paul\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.8\cores\arduino -IC:\Users\paul\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.8\variants\standard -IC:\Users\paul\OneDrive\Pictures\文档\Arduino\libraries\LiquidCrystal_I2C C:\Users\paul\AppData\Local\arduino\sketches\D8874EDE8F9AEA6ADFD23B74DF09A4DA\sketch\sketch_may27b.ino.cpp.merged -o nul -MMD -MF C:\Users\paul\AppData\Local\arduino\sketches\D8874EDE8F9AEA6ADFD23B74DF09A4DA\sketch\sketch_may27b.ino.cpp.merged.libsdetect.d
C:\Users\paul\AppData\Local\Temp\.arduinoIDE-unsaved2026427-21980-hexn6a.99onr\sketch_may27b\sketch_may27b.ino:1:10: fatal error: LiquidCrystal_I2C.h: No such file or directory
 #include <LiquidCrystal_I2C.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Alternatives for LiquidCrystal_I2C.h: [LiquidCrystal_I2C@1.1.4]
ResolveLibrary(LiquidCrystal_I2C.h)
  -> candidates: [LiquidCrystal_I2C@1.1.4]
exit status 1

Compilation error: LiquidCrystal_I2C.h: No such file or directory

this is the code for the system

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
 
void setup() {
  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  lcd.clear();
  pinMode(2, OUTPUT);
  digitalWrite(2, HIGH);
  delay(1000);
  lcd.setCursor(0, 0);
  lcd.print("IRRIGATION");
  lcd.setCursor(0, 1);
  lcd.print("SYSTEM IS ON ");
    lcd.print("");
    delay(3000);
  lcd.clear();
}
 
void loop() {
  int value = analogRead(A0);
  Serial.println(value);
  if (value > 950) {
    digitalWrite(2, LOW);
    lcd.setCursor(0, 0);
    lcd.print("Water Pump is ON ");
  } else {
    digitalWrite(2, HIGH);
    lcd.setCursor(0, 0);
    lcd.print("Water Pump is OFF");
  }
 
  if (value < 300) {
    lcd.setCursor(0, 1);
    lcd.print("Moisture : HIGH");
  } else if (value > 300 && value < 950) {
    lcd.setCursor(0, 1);
    lcd.print("Moisture : MID ");
  } else if (value > 950) {
    lcd.setCursor(0, 1);
    lcd.print("Moisture : LOW ");
  }
}

`

I have merged yet another cross-post.

@jjey1593 you were already asked politely to desist from cross-posting by moderator @PerryBebbington, yet you continued doing so. If you won't listen to our polite requests, I will be forced to give you an account suspension to get your attention. I don't want to do that, and I'm sure you don't want it either. So please pay better attention to being a responsible member of this community of free sharing of knowledge.

Please make sure to read the forum user guide, as @PerryBebbington already requested. That will allow you to understand how to use the forum responsibly, and receive excellent assistance from the highly knowledgeable volunteer helpers here:

it still didnt work even i already the liquidcrystal i2c by martin kubovic

In the IDE, did you use the pull down menu under "Sketch" to use Include Library > Add.ZIP Library to get the downloaded library into the Libraries folder which is in the Arduino file with all the sketches?

The "jm_LiquidCrystal_I2C" library by Jean-Marc Paratte is a different library than the one your sketch code was written for. It is a modified variant of the "LiquidCrystal_I2C" library. I'm sure jm_LiquidCrystal_I2C is an excellent library, but it is only a distraction for getting your current code to compile.

The "LiquidCrystal_I2C" library by Martin Kubovčík, Frank de Brabander does provide the LiquidCrystal_I2C.h header file. So it is unexpected that the compilation fails even after you installed it. We can even see from the compiler output you shared that Arduino IDE did recognize the installation of the library:

I see the problem here:

Unfortunately there is a bug in the C++ compiler Arduino IDE uses under the hood to compile your sketch, which causes it to not recognize libraries that are installed under paths that contain characters like 文档. This, even though of course those are perfectly valid characters to use as a folder name.

The workaround is to change the location where libraries are stored by Arduino IDE to one that is under a path without any non-ASCII characters. I'll provide instructions you can follow to do that:

  1. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Set the path in the "Sketchbook location" preference to any location on your hard drive that does not contain any non-ASCII characters in its path.
    You are welcome to create a new dedicated folder on your hard drive to use for the sketchbook location.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Use Windows "File Explorer" to move the contents of the folder at the previous path of the "Sketchbook location" preference (C:\Users\paul\OneDrive\Pictures\文档\Arduino) to the new location.

thanks a lot bro, it works now

You are welcome. I'm glad it's working.

Regards, Per