I have a similar thread to this one in the Programming Questions section of the Forum. I hope it's OK I started one here (I don't know how to move that one over).
I'm fairly certain that the Tone function does not work with the Arduino Due. I get the errors similar to the following each time it's called out when I tried to compile the code:
"toneMelody.ino: In function 'void setup()': toneMelody:36: error: 'tone' was not declared in this scope toneMelody:43: error: 'noTone' was not declared in this scope"
If I change the board to the the Arduino Uno the program compiles fine.
I looked at the Tone.cpp using a text editor. It has if statements for (AVR_ATmega8) or for (AVR_ATmega1280)
not for the Atmel SAM3X8E ARM Cortex-M3 CPU.
I'm thinking code needs to be added to Tone.cpp so that it will work with the Arduino Due.
Does anyone have a fix for this or am I just doing something wrong (I'm very new to this)?