Arduino: 1.8.13 (Windows 10), Bo mạch:"Arduino Uno"
sketch_oct17a:1:10: fatal error: BH1750.h: No such file or directory
#include <BH1750.h>
^~~~~~~~~~
compilation terminated.
exit status 1
BH1750.h: No such file or directory
Thư viện không hợp lệ được tìm thấy trong C:\Users\truog\OneDrive\Tài liệu\Arduino\libraries\BH1750-1.1.4: no headers files (.h) found in C:\Users\truog\OneDrive\Tài liệu\Arduino\libraries\BH1750-1.1.4
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Can you try to open or view the file via C:\ On the lower left of your picture there is something that shows Dia Cuc Bo (C:)
Start by clicking that then Users, truog etc. The one you are viewing is different.
Hi @tung120298. Unfortunately, the Arduino IDE seems to have a bug that makes it not be able to deal correctly with some of the "extended" (probably not the correct term) characters in the "Tài liệu" folder name of your Arduino sketchbook path. I was able to reproduce it by putting my sketchbook under a path that contained a folder of that name. My path was not under OneDrive, so your use of OneDrive is not related to this problem.
I know there has already been one or more bug reports about this. Including this one:
Until such time as it might be fixed, the best you can do is to work around the bug by changing your sketchbook folder to some path that does not contain any problematic characters. Other than that restriction, you can put the sketchbook folder anywhere that is convenient to you.
The sketchbook folder path is configured in the Arduino IDE by doing this:
Select File > Preferences from the Arduino IDE menus.
Enter the new sketchbook path in the "Sketchbook location" field.
Click the OK button.
If you have anything of value in the old sketchbook folder:
C:\Users\truog\OneDrive\Tài liệu\Arduino
you can copy it over. Note that your libraries are installed there, so you will need to either copy them over or else just reinstall them via the Arduino IDE Library Manager.
@tung120298 This problem presents itself over and over, in different forms. Moral of the story: never use anything but (a-z, A-Z, 0-9, _) and no spaces in your filenames and paths, on anything in your computer. Problem solved.