LiquidCrystal Library: Include Error - PlatformIO Community Home » Arduino Liquidcrystal.h No Such File Or Directory » LiquidCrystal Library: Include Error - PlatformIO Community Maybe your like Arduino Liquidcrystal_i2c Download Arduino Liquid Crystal I2c Github Arduino Liquidcrystal_i2c.h Example Arduino-liquidcrystal-i2c-library-master Download Arduino Liquidcrystal_i2c Tutorial LiquidCrystal Library: include error Libraries platformio-ini yohann.m May 6, 2021, 10:47am 1 I do not understand why #include <LiquidCrystal.h> is not found. I follow the quick start and set the platformio.ini. Then include the corresponding header in main.cpp When it’s not working the quick start guide indicate to run this command: “Menu: View > Command Palette… > PlatformIO: Rebuild C/C++ Project Index” But it does not exist, I found only : Platformio: Rebuild Intellisense Index Which I run. Still same result. EDIT: The program build and can be download to the arduino. With hazardous behaviour. Sometimes, the screen stay blank, sometimes the letter “w” fill the screen. The same program copy and past to the “Arduino IDE”, without the include <Arduino.h>, works perfectly. maxgerhardt May 6, 2021, 4:52pm 2 Does the project build? yohann.m May 6, 2021, 5:05pm 3 Yes, it builds. I update my answer to add more information. Thanks for the question. maxgerhardt May 6, 2021, 5:08pm 4 If it builds the headers must be found. Try executing Ctrl+Shift+P → Rebuild IntelliSense again. Also, the version of the LiquidCrystal library you’re using comes from author fmalpartida, which doesn’t seem to be the ‘official’ one and may behave differently. You may want the standard Arduino one via lib_deps = arduino-libraries/LiquidCrystal @ ^1.0.7 as per this. yohann.m May 7, 2021, 12:14pm 5 I tried with the version you proposed too. The one I show at first is the one proposed by vscode when looking for “LiquidCrystal” Library. yohann.m May 7, 2021, 12:45pm 6 It is still not working. Here all the steps done starting with a new project: new project from PIO Home Choose: Board: Arduino Uno Framework: Arduino Location: Use default location selected Search libraries from PIO HOme do not choose the first library choose: “LiquidCrystal” by Arduino click on “Add to Project” which install the same library used within Arduino IDE Executing Ctrl+Shift+P →PlatformIO: Rebuild C/C++ Project Index add #include <LiquidCrystal.h> in main.cpp => error rise try to get ride off this error with no success: restart vscode Executing Ctrl+Shift+P →PlatformIO: Rebuild C/C++ Project Index add “hello world” code: #include <Arduino.h> #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the number of columns and rows on the LCD lcd.begin(16, 2); // Print a message to the LCD. lcd.print(“Hello World”); } void loop() { } build successful: >Executing task in folder Theremine Lumineux: platformio run Processing uno (platform: atmelavr; board: uno; framework: arduino) Verbose mode can be enabled via -v, --verbose option CONFIGURATION: Redirecting... PLATFORM: Atmel AVR (3.3.0) > Arduino Uno HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 31.50KB Flash DEBUG: Current (avr-stub) On-board (avr-stub, simavr) PACKAGES: - framework-arduino-avr 5.1.0 - toolchain-atmelavr 1.70300.191015 (7.3.0) LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation LDF Modes: Finder ~ chain, Compatibility ~ soft Found 5 compatible libraries Scanning dependencies… No dependencies Building in release mode Checking size .pio/build/uno/firmware.elf Advanced Memory Usage is available via “PlatformIO Home > Project Inspect” RAM: [= ] 10.2% (used 208 bytes from 2048 bytes) Flash: [= ] 12.2% (used 3940 bytes from 32256 bytes) ==================== [SUCCESS] Took 0.81 seconds============ Terminal will be reused by tasks, press any key to close it. upload successful: Configuring upload protocol… AVAILABLE: arduino CURRENT: upload_protocol = arduino Looking for upload port… Auto-detected: /dev/ttyACM0 Uploading .pio/build/uno/firmware.hex avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e950f (probably m328p) avrdude: reading input file “.pio/build/uno/firmware.hex” avrdude: writing flash (3940 bytes): Writing | ################################################## | 100% 0.64s avrdude: 3940 bytes of flash written avrdude: verifying flash memory against .pio/build/uno/firmware.hex: avrdude: load data flash data from input file .pio/build/uno/firmware.hex: avrdude: input file .pio/build/uno/firmware.hex contains 3940 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 0.51s avrdude: verifying … avrdude: 3940 bytes of flash verified avrdude: safemode: Fuses OK (E:00, H:00, L:00) avrdude done. Thank you. ===================== [SUCCESS] Took 3.20 seconds ================= result on arduino: only “w” letters and few “PI” letters load the same program from arduino IDE: “Hello world” appears on the LCD screen reload from vscode: the letter “w” is writen after “Hello world” and then recover it!!! tried with differents text loading from “arduino IDE” and then from vscode. Loading from vscode will always result by some “w” filling the screen. Sometime it also erase the previous message. yohann.m May 8, 2021, 9:20am 7 yohann.m: Executing task in folder Theremine Lumineux: platformio run I just realize that the compilation is not done for the current opened project but for another one! I also manage to “solve” the issue on “include” doing the following: copy/past the LiquidCrystal library in include folder add in the code : #include “LiquidCrystal/src/LiquidCrystal.h” Now, I’m looking for how to build the current opened file. And check if that could have solved the “include ussue” here without having to copy/past the library. maxgerhardt May 8, 2021, 9:34am 8 yohann.m: I just realize that the compilation is not done for the current opened project but for another one! Aha okay thath sounds more likely, I was just about to test this on my own hardware. Please use the project environment switcher to select the project + environment. Building is not done on the currently opened file and cannot be set to do so. yohann.m May 8, 2021, 9:57am 9 Thanks for your time and apologize. I just discover the “project environment switcher”, minutes ago. A petty I did not see your answer earlier. Pointing at the correct project solve all the issues. I removed the library from the include folder. Thanks again. Tag » Arduino Liquidcrystal.h No Such File Or Directory LCD Library Error - Programming Questions - Arduino Forum Errors When Compiling A Program Using LiquidCrystal.h PlatformIO Fatal Build Error: LiquidCrystal.h "No Such File Or Directory" “.h: No Such File Or Directory" - 2 Easy Fixes To Arduino Error - SOLVED 2 Easy Fixes To Arduino Error: “.h: No Such File Or Directory" - YouTube How To Install LiquidCrystal I2C Library For Arduino IDE - YouTube How To Install Liquid Crystal I2C For Arduino Libraries - YouTube LiquidCrystal Library For Arduino - GitHub PlatformIO Fatal Build Error: LiquidCrystal.h "...anycodings LiquidCrystal.h - LCD - Tinkercad Arduino Libray (eg LiquidCrystal) Not Found During Compilation How To Add Libraries To Arduino/libraries - Wiki I2C LCD With ESP32 On Arduino IDE - ESP8266 Compatible