5

I have a sketch which I can upload without problem with the Arduino IDE. I installed the arduino-cli Version: 0.28.0 Commit: 06fb1909 Date: 2022年10月18日T15:53:04Z. I want to compile and upload a code on an arduino uno and use the command line

arduino-cli compile --fqbn arduino:avr:uno mysketch.ino

but get the following error:

/path/to/mysketch.ino:44:10: fatal error: LiquidCrystal.h: No such file or directory
 #include <LiquidCrystal.h>
 ^~~~~~~~~~~~~~~~~
compilation terminated.
Used platform Version Path
arduino:avr 1.8.5 /Users/user/Library/Arduino15/packages/arduino/hardware/avr/1.8.5
Error during build: exit status 1

how could I proceed to debug?

Juraj
18.3k4 gold badges31 silver badges49 bronze badges
asked Nov 6, 2022 at 15:35
3
  • /path/to/mysketch.ino looks like an invalid path Commented Nov 6, 2022 at 17:45
  • @jsotola. Thank you for your comment. It is indeed not the real path. I edited it for the question. But it is the path where the .ino file is Commented Nov 6, 2022 at 17:51
  • how to debug? ... if your OS is Windows ... download process monitor from Microsoft ... use it to figure out where the program is looking for the file ... learn.microsoft.com/en-us/sysinternals/downloads/procmon Commented Nov 6, 2022 at 18:11

1 Answer 1

2

The LiquidCrystal library is bundles with Arduino IDE 1 so it is not installed in your sketchbook folder's libraries folder so CLI can't find it.

Install the library with Arduino CLI or simply copy it from Arduino IDE 1 installation folder into libraries folder of your sketchbook.

answered Nov 6, 2022 at 17:51
3
  • many thanks for your answer @Juraj. what would be the command to install it with the Arduino CLI? Commented Nov 6, 2022 at 17:53
  • @ecjb you work with CLI and you don't know the commands? arduino.github.io/arduino-cli/latest/commands/… Commented Nov 6, 2022 at 18:00
  • The command is: arduino-cli lib install LiquidCrystal for future visitors' convenience. Commented Jun 5, 2023 at 16:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.