Arduino Due tone function in toneMelody example not working

Hi all,

I could not upload the toneMelody example to Arduino Due board. It says that 'tone' was not declared in this scope. I would like to create music. Please help.


IMO it's very easy to produce a tone with an amplifier (because the DUE doesn't output much current from a pin) and a buzzer or a speaker by using timer counters to produce waveforms with 50% duty cycle.

Learn how to output a PWM with a 50% duty cycle and a Timer Counter (numerous example sketeches in the DUE sub forum) or use tc_lib from antodom.

Well, you can use the NewToneLib if you need to use tone() on unsupported arduino devices.
NewToneLib Github: GitHub - YordanYordanovGIT/NewToneLib: New Tone library for arduino devices which do not support the built