Pololu Zumo Shield Arduino Library
Classes | Macros
PololuBuzzer.h File Reference
#include <avr/pgmspace.h>

Go to the source code of this file.

Classes

class  PololuBuzzer
 Play beeps and music with the buzzer. More...
 

Macros

#define PLAY_AUTOMATIC   0
 Specifies that the sequence of notes will play with no further action required by the user.
 
#define PLAY_CHECK   1
 Specified that the user will need to call playCheck() regularly.
 
Note Macros

x specifies the octave of the note

#define NOTE_C(x)   ( 0 + (x)*12)
 
#define NOTE_C_SHARP(x)   ( 1 + (x)*12)
 
#define NOTE_D_FLAT(x)   ( 1 + (x)*12)
 
#define NOTE_D(x)   ( 2 + (x)*12)
 
#define NOTE_D_SHARP(x)   ( 3 + (x)*12)
 
#define NOTE_E_FLAT(x)   ( 3 + (x)*12)
 
#define NOTE_E(x)   ( 4 + (x)*12)
 
#define NOTE_F(x)   ( 5 + (x)*12)
 
#define NOTE_F_SHARP(x)   ( 6 + (x)*12)
 
#define NOTE_G_FLAT(x)   ( 6 + (x)*12)
 
#define NOTE_G(x)   ( 7 + (x)*12)
 
#define NOTE_G_SHARP(x)   ( 8 + (x)*12)
 
#define NOTE_A_FLAT(x)   ( 8 + (x)*12)
 
#define NOTE_A(x)   ( 9 + (x)*12)
 
#define NOTE_A_SHARP(x)   (10 + (x)*12)
 
#define NOTE_B_FLAT(x)   (10 + (x)*12)
 
#define NOTE_B(x)   (11 + (x)*12)
 
#define SILENT_NOTE   0xFF
 silences buzzer for the note duration
 
#define DIV_BY_10   (1 << 15)
 frequency bit that indicates Hz/10
e.g. frequency = (445 | DIV_BY_10) gives a frequency of 44.5 Hz
 

Detailed Description

See the PololuBuzzer class reference for more information about this library.

The main repository for this library is https://github.com/pololu/pololu-buzzer-arduino, though copies of this library also exist in other repositories.

Definition in file PololuBuzzer.h.