What am I doing wrong? I've installed but when I verify it says it can find them!
I'm sure it's something simple but for the life of me I can't see it!
Thanks Eliot
(mod edit)
What am I doing wrong? I've installed but when I verify it says it can find them!
I'm sure it's something simple but for the life of me I can't see it!
Thanks Eliot
(mod edit)
There is a help section for just that topic.
Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
From your screenshot, I can see that what you call "installed" was actually just copying the library files into the sketch folder.
There are two different styles of #include directives:
The angle brackets syntax (#include <Foo.h>) causes the preprocessor to search the libraries folders for the file. The libraries folders are the location where libraries are installed during a normal installation. When you using the Library Manager or "Install .ZIP Library" installation methods (as described by the library installation guide at the link ballscrewbob provided), the library will automatically be installed to the libraries folder. You can also manually install the library to the libraries folder if you prefer. Instructions for doing that are also provided in the library installation guide.
The double quotes syntax (#include "Foo.h") causes the preprocessor to first search the local path, followed by the libraries folders if the file was not found in the local path.
So when you want to #include files from the sketch folder, you must always use the double quotes syntax.
In some specific cases, it makes sense to install a library into the sketch folder. One case would be if you wanted to create a self-contained program so you can share it without requiring the installation of library dependencies, or so you can pin a specific version of the library. Another case would be if you wanted to be able to easily modify the library code to experiment with it.
However, it it generally recommended to just do a normal library installation. The whole point of libraries is to be able to share the same code between many projects. Having only a single copy of the library on your computer makes it easy to update. Imagine how much work it would be to update a library if you end up with many sketches using individual copies of the library. It's also often desirable to not expose the library code in a sketch. The sketch code is easy for a beginner to understand, but once you add all those extra tabs of library code on, it can become very overwhelming.
If you persist with this practice, you will discover that many library authors used the wrong #include directive syntax for #includes of local files. When the library is installed normally, you can get away with the angle brackets syntax, even though it is not the appropriate syntax to use for local files. This causes sloppy developers to use whichever random syntax they happen to feel like at the time. Once someone tries to bundle the library with a sketch, the inappropriate syntax no longer works. So you will often find you need to go in and modify libraries just to use them in this manner, and repeat that modification every time you update the library.
It can also get very messy once you start bundling multiple libraries with a sketch. Your sketch folder will turn into a big jumble of different library files mixed together. You can work around this by using the src subfolder:
https://arduino.github.io/arduino-cli/sketch-specification/#src-subfolder
but that doesn't help with the #include syntax situation, or with issue of having to modify the #include directives for interdependencies between bundled libraries.
Long story short, just follow the instructions ballscrewbob provided, but keep in mind that it is possible to use #include directives for files in the sketch, which can be very useful for purposes other than getting away with a weird approach to library installation.
That's great, I tried with the "----" and it happier but now I get:
Arduino: 1.8.12 (Windows Store 1.8.33.0) (Windows 10), Board: "Arduino Uno"
demo1_ES:41:18: error: stray '\342' in program
Serial.print(“No data”);
^
demo1_ES:41:19: error: stray '\200' in program
Serial.print(“No data”);
^
demo1_ES:41:20: error: stray '\234' in program
Serial.print(“No data”);
^
demo1_ES:41:28: error: stray '\342' in program
Serial.print(“No data”);
^
demo1_ES:41:29: error: stray '\200' in program
Serial.print(“No data”);
^
demo1_ES:41:30: error: stray '\235' in program
Serial.print(“No data”);
^
C:\Users\EliotSmith\OneDrive - Pro-Moto\Documents\Arduino Folder\demo 1\demo1_ES\demo1_ES.ino: In function 'void loop()':
demo1_ES:41:21: error: 'No' was not declared in this scope
Serial.print(“No data”);
^~
exit status 1
stray '\342' in program
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Can you help?
Thanks Eliot
This is caused by the use of "fancy quotes" on your strings. You need to replace those with normal quotes. You can't see them on the forum because it automatically changes fancy quotes to normal quotes.
This is commonly caused by copying code from a website that ruins code by "prettifying" the text. Word processors often do this too.