I'm working on a wall detecting bug bot out of the Arduino Robotics book. It basically closes one of five switches to tell it that it has hit an object Got it working with no problem. As I am still learning, I thought I would put a speaker on it and make it play a sound when one of the switches closed. The file I'm trying to incorporate into my (working) bug bot sketch is the tone example located in the Arduino library, and it uses the 'pitches.h' file. So I put "#include pitches.h" right under the "#include servo.h statement. I then compile to make sure it's finding the pitches.h file, and I get the following, "Bug_bot_Music.cpp:12:21: error: pitches.h: No such file or directory"
Now my questions. There is no bug_bot_music.cpp file. Matter of fact, the original sketch was copied and pasted out of a pdf file, so I don't have a .cpp with this sketch, as far as I know. Am I wrong to assume that a sketch doesn't have to have a .cpp file to compile correctly. And secondly, the pitches.h file is presently located in the library/tone directory, but evidently this new sketch is not finding it. So.....what am I doing wrong and where should I locate my files so the compiler finds them correctly.
As I said, I'm new, so be kind and just tolerate my ignorance.