Using a Tone library, but get compile errors...

Programming an Arduino ZERO. Using Arduino 1.6.7. I found a really cool library called Tone. I dropped the library in my libraries directory.
In my sketch, I include Tone.h and “Tone” appears in bold orange like it knows where to find it.

then, I declare a variable of type Tone

Tone frequ1;

but I get compile time error “error: ‘Tone’ Does not declare a type”

I attached my sketch, Tone.h from the library, and the error I get at compile time

Can someone point out my mistake?

thanks!

sketch_mar04a.ino (182 Bytes)

Tone.h (3.23 KB)

error.txt (6.52 KB)

I am not sure what “dropped the library” means.
But the instructions for installing a library is https://www.arduino.cc/en/Guide/Libraries

The tone library is installed as standard (if I remember correctly). To use it, you use a function call:

Syntax

tone(pin, frequency) tone(pin, frequency, duration)

see: https://www.arduino.cc/en/Reference/Tone

6v6gt: The tone library is installed as standard (if I remember correctly).

It isn't installed for me on IDE 1.6.7 on Linux.

ieee488: It isn't installed for me on IDE 1.6.7 on Linux.

Yes. Sorry. You are right. It is a "contributed" library: https://www.arduino.cc/en/Reference/Libraries I must have installed it in my sleep.

I need to clarify. Tone is different than the standard tone() function call. It is a 3rd party class that I downloaded from here.

https://code.google.com/archive/p/rogue-code/wikis/ToneLibraryDocumentation.wiki

Its claim to fame is that it can set a tone on more than one pin. The standard tone() function call only allows one pin.

Thanks for the help everyone.

ieee4888-- I used the Library Manager and it says that the Tone library is installed. I have a

I am still not sure what the compiler is compaining about.

Thanks for any help!

You're also using the Arduino Zero which you should have mentioned. Did you verify that that library is compatible?

I mentioned that I was using the Arduino ZERO in the first sentence. :) To be honsest, I am just a newb at this, so I didnt think to ask. Besides, the error seems to indicate that it doesnt know what the Tone class is... I would think that if it was incompatible, I would get an error in the Tone class itself.... OR, will the compiler not compile at all an incompatible library?????

thanks!

That library is only compatible with boards based on AVR microcontrollers, it will not work with the Zero.

Not sure why that's the error it's failing with, though. I would expect one of several different errors.

argghhh! ok

Thanks DrAzzy