Tone library compiling error

Hi!
Sorry for my bad english :slight_smile:
I’ve tried to make a simple circuit on my Arduino Uno atmega328p with this code (http://forum.arduino.cc/index.php/topic,8409.0.html)

I’ve installed the Tone library on arduino\libraries\Tone and added the string #include <arduino.h> on the Tone.h file. I obtain the following error:

C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp: In member function ‘void Tone::begin(uint8_t)’:
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp:121: error: ‘bitWrite’ was not declared in this scope
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp:123: error: ‘digitalPinToPort’ was not declared in this scope
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp:123: error: ‘portOutputRegister’ was not declared in this scope
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp:124: error: ‘digitalPinToBitMask’ was not declared in this scope
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp: In member function ‘void Tone::play(uint16_t, uint32_t)’:
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp:198: error: ‘OUTPUT’ was not declared in this scope
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp:198: error: ‘pinMode’ was not declared in this scope
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp:294: error: ‘bitWrite’ was not declared in this scope
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp: In member function ‘void Tone::stop()’:
C:\Users\Edoardo2\Documents\Arduino\libraries\Tone\Tone.cpp:361: error: ‘digitalWrite’ was not declared in this scope

How I can resolve that? Thanks for help and sorry again 4 my (very) orrible english. :smiley:
(P.s: I use Arduino 1.0.5 on Win 8 )

I've installed the Tone library

From where?

From https://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation#Download_and_Installation

The “latest version” has this set of include files:
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <wiring.h>
#include <pins_arduino.h>
#include “Tone.h”
The library is advertised as being for Arduino boards, not wiring boards. So, why it includes wiring.h instead of Arduino.h is a bit of a mystery. But, if you make that change, the code should then compile.