B4R Question [SOLVED] <LiquidCrystal.h> not found - How to change libraries folder in arduino-cli

hatzisn

Well-Known Member
Licensed User
Longtime User
Good evening everyone,

I kept postponing this but now that I have to correct something and I cannot do it, we have reached the node...
What happens is that I had Arduino 1.8.19 installed in my computer and I had created an app that used Liquid Crystal Display. I completely removed the Arduino 1.8.19 and installed the 2.0. I keep getting this error in the logs of B4R.


Also in the compilation window I get this:


I cannot figure out what is wrong. What I did is the following :

1) Uninstall Arduino IDE 2.x
2) Uninstall B4R
3) Clear the Registry from all Arduino keys
4) Reinstall Arduino IDE
5) Reinstall B4R
6) Because Documents folder is located in OneDrive I right clicked and selected "Make all files local" in Arduino folder. Meanwhile I see the full folder with a green check next to it (all files are local)

(And because of the fact that the Arduino IDE sketchbook location in Arduino IDE preferences, contains unicode characters - in Greek: Documents=Έγγραφα)
7) Changed Windows Language (nothing changed - Arduino sketchbook still displayed with ~έγγραφα~)
8) Changed Windows Locale (nothing changed - the same)

I tried directly in Arduino with this sketch and got the same error when I validated the code.

C++:
#include <LiquidCrystal.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

At last what I tried and it worked in Arduino but not in B4R was:
9) I copied the Arduino folder in Onedrive/Έγγραφα (=documents) in an other folder outside and have set the sketchbook folder to this new folder. In Arduino IDE the previous brief sketch compiled but in B4R again not.

I am completely through of ideas and I cannot figure out how to make it work. Any bells anyone?
 
Last edited:

hatzisn

Well-Known Member
Licensed User
Longtime User
I solved it!!!

Steps to solve it:
1) Go to arduino-cli folder and write in a cmd (might require administrator privileges) :

B4X:
arduino-cli config init

2) It will tell you where the configuration yaml is saved and its name.

3) Edit it with notepad in line "user:" in "directories:" and set a folder outside the unicode documents folder (έγγραφα in greek) for the sketchbook folder where it will contain the libraries . You 're done.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…