-4

I downloaded the NewPing.h library and included them in the arduino library folder but I still getting this error:

N:\Arduino\avoi\avoi.ino:3:21: fatal error: NewPing.h: No such file or directory

 #include <NewPing.h>

                     ^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.
Man Dang
  • 21
  • 1
  • 6

2 Answers2

1

Go to the Arduino IDE, in the top go to Sketch -> Include Library -> Manage Libraries...

Then search for NewPing, and install the only one that shows. After that you're done you can use the header like so:

#include <NewPing.H>

Hope it helps.

0

To check the correct syntaxis go to Arduino IDE > File > Examples and search for newping examples (they will appear if newping library is installed) if not go to Sketch > Include Library > Manage Libraries > Search for newping > install

mindlid
  • 1,679
  • 14
  • 17