Tone Error Message

So I'm new to Arduino and using it, and am trying to just learn the basics of programming an Arduino for a future project. I went and looked and copied the program for tone along with making the pitches.h file in the tutorials section of the Arduino website. It gives me this error:

sketch_nov04a.cpp:18:22: error: pitches.h: No such file or directory sketch_nov04a:21: error: 'NOTE_C4' was not declared in this scope sketch_nov04a:21: error: 'NOTE_G3' was not declared in this scope sketch_nov04a:21: error: 'NOTE_G3' was not declared in this scope sketch_nov04a:21: error: 'NOTE_A3' was not declared in this scope sketch_nov04a:21: error: 'NOTE_G3' was not declared in this scope sketch_nov04a:21: error: 'NOTE_B3' was not declared in this scope sketch_nov04a:21: error: 'NOTE_C4' was not declared in this scope

What have I done wrong?

The first line of the error messages tells you what is wrong - it cannot find pitches.h. Have you downloaded it and installed it in the correct location?

No I haven't. Like I said, I'm new at this and didn't know that had to be done. Do I just download the tone library to the libraries folder?

You need pitches.h, pitches.cpp and possibly keywords.txt. Put these in the libraries folder in the same directory as your sketches.

Thank you for helping so far, but there are more problems yet. Because I could not find a pitch library, I downloaded the Tone library, and tried that. Where before in the code there was "pitches.h" I just changed pitches to tone and got a whole new set of error messages:

C:\Program Files (x86)\arduino-1.0.1\libraries\Tone\Tone.cpp: In member function 'void Tone::begin(uint8_t)': Tone:117: error: 'bitWrite' was not declared in this scope Tone:119: error: 'digitalPinToPort' was not declared in this scope Tone:119: error: 'portOutputRegister' was not declared in this scope Tone:120: error: 'digitalPinToBitMask' was not declared in this scope C:\Program Files (x86)\arduino-1.0.1\libraries\Tone\Tone.cpp: In member function 'void Tone::play(uint16_t, uint32_t)': Tone:194: error: 'OUTPUT' was not declared in this scope Tone:194: error: 'pinMode' was not declared in this scope Tone:290: error: 'bitWrite' was not declared in this scope C:\Program Files (x86)\arduino-1.0.1\libraries\Tone\Tone.cpp: In member function 'void Tone::stop()': Tone:357: error: 'digitalWrite' was not declared in this scope

Do you have any idea what's going on here?

I downloaded the Tone library, and

put it in the wrong place. Only core libraries go in that folder. User downloaded libraries go in the libraries folder of the sketch directory. Don't have one? Make one!

I can't be certain because I can't see your code, but I would guess that you are trying to access functions that are in the pitches library but aren't in the tones one?

Ok, so i turns out that in the examples folder in the Arduino folder there is this program with the pitches.h file by it, and get what I should have done, and I now know that the .h is just a text file. Thank you for helping me with this.

:( > :( > :( > :( > :( > :( > :( > :( > :( > :( > :( Arduino: 1.8.5 (Windows 7), Placa:"Arduino/Genuino Uno"

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\Balcao2\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\Balcao2\AppData\Local\Temp\arduino_build_791788 -warnings=default -build-cache C:\Users\Balcao2\AppData\Local\Temp\arduino_cache_676422 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\Balcao2\Documents\Arduino\smaqrt_io\smaqrt_io.ino C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\Balcao2\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\Balcao2\AppData\Local\Temp\arduino_build_791788 -warnings=default -build-cache C:\Users\Balcao2\AppData\Local\Temp\arduino_cache_676422 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\Balcao2\Documents\Arduino\smaqrt_io\smaqrt_io.ino Using board 'uno' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr Using core 'arduino' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr Detecting libraries used... "C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Balcao2\AppData\Local\Temp\arduino_build_791788\sketch\smaqrt_io.ino.cpp" -o "nul" "C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Balcao2\AppData\Local\Temp\arduino_build_791788\sketch\smaqrt_io.ino.cpp" -o "C:\Users\Balcao2\AppData\Local\Temp\arduino_build_791788\preproc\ctags_target_for_gcc_minus_e.cpp" C:\Users\Balcao2\Documents\Arduino\smaqrt_io\smaqrt_io.ino:4:21: fatal error: pitches.h: No such file or directory

include "pitches.h"

^

compilation terminated.

exit status 1 Erro compilando para a placa Arduino/Genuino Uno wf