The buzzer is connected to the pin PD3/INT1/OC2B/PCINT19 of the Atmega328, which is the Arduino pin 3 (pwm).
All the atmega328 timers are used by both Arduino and the Gamebuino library:
Timer 0 is for Arduino functions like delay(), millis() and micros(), which are used by the Gamebuino library for timing (framerate regulation and alike).
Timer 1 is used to generate interruptions to update the sound waveform at about 57Khz (it might seem high but it's to manage accurate sound frequency and not to be off-tune)
Timer 2 is used to generate 30Khz PWM output to the pin 3 as a DAC of sound generation
More info about arduino, timers and interruptions :
http://letsmakerobots.com/content/arduino-101-timers-and-interruptsIf you disable the sound engine by changing
- Code: Select all
#define NUM_CHANNELS 1
to
- Code: Select all
#define NUM_CHANNELS 0
in the file settings.c in the Gamebuino library folder, you should be able to use libraries that require timer 1 or 2.
You're not asking for it, but some people might be interested by the
Sound page of the wiki which explains how the sound library works (but there is no composer yet...)