Arduino ADK and the 8bit, 800hz Audio playback demo

I am running the code detailed in the link:

but nothing is happening, I am using the Arduino Mega ADK,.

If I run a basic audio sketch (not using timers/interrupts etc... then I can hear it fine).

Is this something do do with the pin I am using, I have tried pins 3 and 11, is it possible I should be using a different pin with the ADK?



Looking at the code it makes reference to ATMega pins OC2A and OC2B, the Arduino Atmega pin mapping diagram maps these pins to Arduino pins 10 and 9 respectively. 10 didn't work for me (even with changing if(speakerPin==11)... to a 10, but pin 9 worked fine.


That code uses timer1 explicitly.

The Mega and the Uno have completely different mappings from timers to pins,
on the Mega timer1 controls pins 11, 12 and 13, on the uno it controls pins 9 and 10.