I had just downloaded the library "New Ping" for a distance sensor. The new library shows up, but does not work when I tried to test it. Error message says this:
Arduino: 1.5.8 (Windows 8), Board: "Arduino Uno"
sketch_dec27b.ino:2:21: fatal error: NewPing.h: No such file or directory
compilation terminated.
Error compiling.
I have tried adding the library into the file destination, but says it is unable to. Any suggestions?
Is not in the sketches folder. Inside the sketches folder you have one folder called "libraries". You must copy the folder of your library to there. You can use too the option "Import Library..." from the "Sketch" menu of your Arduino IDE.
It shows up in the sketches folder, but still does not work.
Bullpoop. If you can't even compile code that uses the library, you can NOT make any assertions as to the proper functioning of the code in the library.
Change the folder name to NewPing_v1_5;
Copy the files to this folder (if they are not in there yet);
Change the names of the files to NewPing_v1_5.h and NewPing_v1_5.cpp;
Rooster14250:
The file location is Arduino>libraries>NewPing_v1.5
That is not the exact location of the files but it does sound like it is the wrong place. Follow the advice in the link given in reply #7 to put it in the correct libraries folder (there are two) and to name the folder and files correctly.
Thanks for the advice guys! I just figured out that I had imported the uncompressed version of the library, and not the zip file. After uploading the right file, it worked except for a small coding error that I can fix. Thanks again!