Zumo32U4 library
|
#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. More... | |
#define | PLAY_CHECK 1 |
Specified that the user will need to call playCheck() regularly. More... | |
Note Macros | |
#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 More... | |
#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 More... | |
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.
#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
Definition at line 86 of file PololuBuzzer.h.
#define NOTE_A | ( | x | ) | ( 9 + (x)*12) |
Definition at line 75 of file PololuBuzzer.h.
#define NOTE_A_FLAT | ( | x | ) | ( 8 + (x)*12) |
Definition at line 74 of file PololuBuzzer.h.
#define NOTE_A_SHARP | ( | x | ) | (10 + (x)*12) |
Definition at line 76 of file PololuBuzzer.h.
#define NOTE_B | ( | x | ) | (11 + (x)*12) |
Definition at line 78 of file PololuBuzzer.h.
#define NOTE_B_FLAT | ( | x | ) | (10 + (x)*12) |
Definition at line 77 of file PololuBuzzer.h.
#define NOTE_C | ( | x | ) | ( 0 + (x)*12) |
Definition at line 62 of file PololuBuzzer.h.
#define NOTE_C_SHARP | ( | x | ) | ( 1 + (x)*12) |
Definition at line 63 of file PololuBuzzer.h.
#define NOTE_D | ( | x | ) | ( 2 + (x)*12) |
Definition at line 65 of file PololuBuzzer.h.
#define NOTE_D_FLAT | ( | x | ) | ( 1 + (x)*12) |
Definition at line 64 of file PololuBuzzer.h.
#define NOTE_D_SHARP | ( | x | ) | ( 3 + (x)*12) |
Definition at line 66 of file PololuBuzzer.h.
#define NOTE_E | ( | x | ) | ( 4 + (x)*12) |
Definition at line 68 of file PololuBuzzer.h.
#define NOTE_E_FLAT | ( | x | ) | ( 3 + (x)*12) |
Definition at line 67 of file PololuBuzzer.h.
#define NOTE_F | ( | x | ) | ( 5 + (x)*12) |
Definition at line 69 of file PololuBuzzer.h.
#define NOTE_F_SHARP | ( | x | ) | ( 6 + (x)*12) |
Definition at line 70 of file PololuBuzzer.h.
#define NOTE_G | ( | x | ) | ( 7 + (x)*12) |
Definition at line 72 of file PololuBuzzer.h.
#define NOTE_G_FLAT | ( | x | ) | ( 6 + (x)*12) |
Definition at line 71 of file PololuBuzzer.h.
#define NOTE_G_SHARP | ( | x | ) | ( 8 + (x)*12) |
Definition at line 73 of file PololuBuzzer.h.
#define PLAY_AUTOMATIC 0 |
Specifies that the sequence of notes will play with no further action required by the user.
Definition at line 42 of file PololuBuzzer.h.
#define PLAY_CHECK 1 |
Specified that the user will need to call playCheck()
regularly.
Definition at line 46 of file PololuBuzzer.h.
#define SILENT_NOTE 0xFF |
silences buzzer for the note duration
Definition at line 81 of file PololuBuzzer.h.