This happens with all libraries. i have verified the code on another pc but on mine, despite downloading the library, it keeps giving me the 'no such file or directory' compilation error.
This is an example of the error message i get:
FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
C:\Users\Arwar\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\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\Arwar\AppData\Local\Temp\arduino\sketches\2B4803D8AB2B7A1BC1E53D064B92E849\sketch\sketch_may3a.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
-> candidates: [Wire@1.0]
C:\Users\Arwar\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\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -IC:\Users\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src C:\Users\Arwar\AppData\Local\Temp\arduino\sketches\2B4803D8AB2B7A1BC1E53D064B92E849\sketch\sketch_may3a.ino.cpp -o nul
Alternatives for MAX30100_PulseOximeter.h: [MAX30100lib@1.2.0]
ResolveLibrary(MAX30100_PulseOximeter.h)
-> candidates: [MAX30100lib@1.2.0]
C:\Users\Arwar\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\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -IC:\Users\Arwar\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Arwar\OneDrive\المستندات\Arduino\libraries\MAX30100lib\src C:\Users\Arwar\AppData\Local\Temp\arduino\sketches\2B4803D8AB2B7A1BC1E53D064B92E849\sketch\sketch_may3a.ino.cpp -o nul
C:\Users\Arwar\AppData\Local\Temp\.arduinoIDE-unsaved202443-31532-j3c6g9.y4rbb\sketch_may3a\sketch_may3a.ino:2:10: fatal error: MAX30100_PulseOximeter.h: No such file or directory
#include "MAX30100_PulseOximeter.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Alternatives for MAX30100_PulseOximeter.h: [MAX30100lib@1.2.0]
ResolveLibrary(MAX30100_PulseOximeter.h)
-> candidates: [MAX30100lib@1.2.0]
exit status 1
Compilation error: MAX30100_PulseOximeter.h: No such file or directory
Unfortunately there is a bug in the sketch compiler that causes it to fail to find the library when it is installed under a path that contains this sort of character:
The workaround will be to configure Arduino IDE to use a different path to store libraries. I'll provide instructions you can follow to do that:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Click the "BROWSE" button on the right side of the "Sketchbook location" field.
The "Select a new sketchbook location" dialog will open.
Select a folder in any location that contains only basic ASCII characters (the characters A-z, 0-9, _, -, . are safe). Make sure to pick a location that will be safe to store your files since, in addition to containing installed libraries, the sketchbook is a convenient location to save your sketches.
Click the "Choose" button in the "Select a new sketchbook location" dialog.
Click the "OK" button in the "Preferences" dialog.
Move all the files from the folder at the path of the old sketchbook location:
C:\Users\Arwar\OneDrive\المستندات\Arduino
to the folder at the path of the new sketchbook location you set in the Arduino IDE preferences.
Once you have finished performing the instructions above, try compiling your sketch again. Hopefully the compilation will be successful this time.
While it's very likely that @ptillisch has the correct solution regarding non ASCII characters (as I am not one of the experts), may I add further to their comment about your sketchbook will go wherever you specify in the IDE under
File > Preferences
The line "Sketchbook location:" in my case reads
C:\Users\hallowed31\Documents\Arduino\sketchbook
which is important because all the libraries I add go inside a folder called libraries inside the sketchbook.
I run IDE version 1.8.10.
Thus, the full path for contributed/added libraries for me anyway if I was using the library you are trying to use would be:
The folder that seems intuitive to use, in your case what you screenshot in post #4 that uses the default Arduino libraries folder, for some reason isn't the preferred way to do it. I think it had to do with ensuring your collection of libraries remains portable along with your sketchbook.
NOTE that the libraries folder INSIDE my sketchbook is a folder I manually added. As in right clicking, New>Folder and typed in libraries. I did not just cut and paste the one in the folder tree one level higher that Arduino auto creates when you install the IDE for the first time.
That was exactly the issue! I unlinked one drive, changed the folders language on onedrive then linked it again, and im not facing an error with the arduino ide or any ide which also always failed to compile. Thanks a lot.