AVR Library Command Reference

4. Orangutan Buzzer: Beeps and Music
The OrangutanBuzzer class and the C functions in this section allow various sounds to be played on the buzzer of
the Orangutan SV-168, Orangutan LV-168, and 3pi, from simple beeps to complex tunes. The buzzer is controlled
using one of the Timer1 PWM outputs, so it will conflict with any other uses of Timer1. Note durations are timed
using a Timer1 overflow interrupt, which will briefly pause your main program at the frequency of the sound. In
most cases, the interrupt-handling routine is very short. However, when playing a sequence of notes in
PLAY_AUTOMATIC mode (the default mode) with the play() command, longer interrupts occur between notes. It
is important to take this into account when writing timing-critical code.
For a higher level overview of this library and example programs that show how this library can be used, please see
Section 5.b of the guide to Programming Orangutans from the Arduino Environment [http://www.pololu.com/docs/
0J17] or Section 6.d of the Pololu AVR C/C++ Library User’s Guide [http://www.pololu.com/docs/0J20].
Pololu AVR Library Command Reference © 2001–2009 Pololu Corporation
4. Orangutan Buzzer: Beeps and Music Page 8 of 35